User-based visibility
This module restricts access to the contents of the current application, during browsing and search, by matching a metadata of the content against a metadata of the signed-in user.
Where Content-based visibility names the allowed users and groups for a set of contents, user-based visibility names no one: it expresses a rule valid for all, which each user resolves in their own way based on the value of their own metadata. The same rule therefore gives a different scope to each user.
The two modules add up: a content is only visible if it satisfies both.
Configuration
Enter the GQL predicate that relates a metadata of the content and a metadata of the current user, referenced by the ${user.<metadata>} wildcard:
extended.country = '${user.country}'
With this rule, each user only sees the contents whose country matches theirs: a user whose country metadata is France only sees the contents whose extended.country is France.
This module is applied by the Apply user-based visibility flow.
Flows
This module can be used in the following flow: