When configuring access to the app item, you can assign rights to employees specified in a certain field on the item page. This allows you to flexibly set up access in the app, as different employees can be selected for each item in the field. The permissions are automatically granted to the specified users and are dynamically updated when the information on the page changes.
The following type properties are used for configuration:
- Users. Users of the system are specified in the field.
- Role. Users, groups, or org chart items can be specified in the field.
You can grant access to items based on properties from the context of:
- Current app.
- App associated with the current app. The option is available in the BRIX On-Premises edition if the
allowCollectionFieldPermissions
flag is enabled.
Grant rights to employees on the page of the current item
Assume that the Contracts app has the Assigned to context variable of the Users type. Let’s configure access so that the CCO and the CFO see all contracts, and the person responsible for the contract sees only their contracts. To do this:
- Open the access settings of the Contracts app.
- Enable the Restrict access to data > Restrict access to app items option.
- Remove the Author role.
- Click the +Add button in the access settings window.
- Add the CCO and CFO org chart items and grant them full access.
- Click the +Add button in the access settings window.
- Select the App Property option.
- Select the Assigned to variable from the drop-down list.
- Set the following access rights: view and edit.
- Save the settings.
Now the author, once created, will not be able to view or edit the Contract app item. Full access is allowed only to the CCO and CFO. They can open the contract and select the required user in the Assigned to field. Only this user will be able to view and edit the contract page.
Grant rights to employees on the page of an associated item
Assume that managers who work with customers need to be granted permission to view items in the Pricing app.
There are segments of customers for each pricing plan: individuals, small businesses, medium businesses, etc. The list of these segments is stored on the pricing page. Different managers work with different customer segments. You need to configure permissions so that managers see only the pricing that is relevant for their customers and do not have access to other offers. At the same time, the list of segments for which the pricing plan is available may change, and the permissions should be updated dynamically.
This can be done by granting permission to view items in the Pricing app to users specified in the Managers property from the context of the associated Customer Segments app.
начало внимание
Access configuration to app items through the associated app’s property is available for BRIX On-Premises edition when the allowCollectionFieldPermissions
flag is enabled. Read more in the Modify BRIX Enterprise parameters and Modify BRIX Standard parameters articles.
конец внимание
To configure such permissions, perform the following steps:
- Go to the access settings of the Pricing app.
- Enable the Restrict access to data > Restrict access to app items option.
- Click +Add and select the App Property option. From the drop-down list, select the Customer Segments field from the context of the Pricing app, then select the Managers nested property from the Customer Segments app.
- Set view permission for managers.
- Save the settings.
Now managers who work with a certain customer segment have the rights to view those pricing plans whose pages contain this segment. If the segment list for a pricing plan is changed, the managers’ rights will be automatically updated.