access_grants parameter.
Refer to the Controlling data access guide for more information and examples.
Syntax
Properties
string[]
An array of access grant names that control access to the composite topic. Each value must match an access grant defined in the model file. Use
| for OR conditions and & for AND conditions within the same array element.Behavior
These grants apply in addition to each member topic’s grants. They can restrict access to the composite topic, but they can’t grant access to member topic data a user is otherwise denied. If omitted, the model’sdefault_topic_required_access_grants applies, even when every member topic opts out of it. Set required_access_grants: [] to exclude the composite topic from the default.
Examples
The examples in this section use the following model and topics. In each table, the columns are user groups, where Both is a user in Finance and Marketing.Model file
campaigns requires the marketing grant. orders has no grants.
campaigns.topic
Restrict the composite topic
The composite topic requiresfinance.
orders_and_marketing.composite_topic
marketing grant from campaigns, a user needs both finance and marketing to query it.
| Topic | Finance | Marketing | Both |
|---|---|---|---|
orders | ✅ | ✅ | ✅ |
campaigns | ❌ | ✅ | ✅ |
orders_and_marketing | ❌ | ❌ | ✅ |
Grant access if either condition is met
Use a pipe (|) to require one of several grants. The composite topic requires finance or marketing.
orders_and_marketing.composite_topic
marketing grant from campaigns, a user needs marketing to query it.
| Topic | Finance | Marketing | Both |
|---|---|---|---|
orders | ✅ | ✅ | ✅ |
campaigns | ❌ | ✅ | ✅ |
orders_and_marketing | ❌ | ✅ | ✅ |
Opt out of the model default
The model default isfinance, and both member topics opt out of it.
Model file
orders.topic
campaigns.topic
orders_and_marketing sets required_access_grants: [], so it requires only marketing.
orders_and_marketing.composite_topic
campaign_performance does not set required_access_grants, so the model default applies and it requires finance and marketing.
campaign_performance.composite_topic
| Topic | Finance | Marketing | Both |
|---|---|---|---|
orders | ✅ | ✅ | ✅ |
campaigns | ❌ | ✅ | ✅ |
orders_and_marketing | ❌ | ✅ | ✅ |
campaign_performance | ❌ | ❌ | ✅ |

