Skip to main content
Defines a list of default access filters for topics in the model. Access filters limit row-level access to data based on user attributes.

Syntax

default_topic_access_filters:
  - field: <view>.<field>
    user_attribute: <user_attribute_reference>
    values_for_unfiltered: [<user_attribute_value>]
  - field: <view>.<field>
    user_attribute: <user_attribute_reference>
    values_for_unfiltered: [<user_attribute_value>]
field
string
required
The name of a field, specified using <view>.<field> convention, to match to the user_attribute.
user_attribute
string
required
A user attribute reference. Records with field values that match the user’s attribute value will be visible to the user.For example, if a user has a customer value of blobsrus and the products.brand field in a record has a blobsrus value, the user will have access to the record.
values_for_unfiltered
string[]
User attribute values that allow unrestricted access. Users with these values will not have the access filter applied.
Do not use the same value as the attribute’s default. Any user who inherits the attribute’s default value will receive unfiltered data.

Examples

Match brand field value to customer user attribute value
default_topic_access_filters:
  - field: products.brand
    user_attribute: customer
    values_for_unfiltered: [is_admin]

Troubleshooting

If an access filter can’t be mapped to a topic, an error will surface in the model IDE. Add a blank access_filters parameter to the topic to resolve the issue:
Topic file
access_filters: []