﻿# Examples of configuring access to items using an app property

> [HTML Version](property-based-permissions.html)

When [configuring access to the app item](element-right.md), 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](360009707032.md#users). Users of the system are specified in the field.

- [Role](360009707032.md#role). Users, [groups](360007146071.md), or [org chart items](360003861992.md) can be specified in the field.

You can grant access to items based on properties from the context of:

- Current app.

- App [associated](360029148471.md) with the current app. The option is available in the BRIX On-Premises edition.

## 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 other employees see only the contracts that are assigned to them.

To do this:

1. Open the access settings of the **Contracts** app.

2. Enable the **Restrict access to data > Restrict access to app items **option.

3. Remove the **Author** role.

4. Click the **+Add** button in the access settings window.

5. Add the **CCO** and **CFO** org chart items and grant them full access.

6. Click the **+Add** button in the access settings window.

7. Select the **App property** option.

8. Select the **Assigned to** variable from the drop-down list.

**(property-based-permissions-1.png)**

9. Set the following access rights: view and edit.

10. 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 sales reps 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 **Sales Reps** 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 \[OBJECT\] flag is enabled. Read more in [Modify BRIX parameters](change-settings-enterprise.md#enable-feature-flag-enterpeise).

````
конец внимание

````
To configure such permissions, perform the following steps:

1. Go to the access settings of the **Pricing** app.

2. Enable the **Restrict access to data > Restrict access to app items** option.

3. 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 **Sales Reps** nested property from the **Customer Segments** app.

**(property-based-permissions-2.png)**

4. Set view permission for sales reps

**(property-based-permissions-3.png)**

5. Save the settings.

Now sales reps 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 sales reps’ rights will be automatically updated.