# Set up your permission rule

#### Who does this apply to?

Choose which role(s) your permissions apply to:

1. Choose **Everyone** for the permission to apply to everyone in the app, excluding **Admins.**&#x20;
2. Choose **Specific roles** then select which roles this permission rule should apply to.

{% hint style="info" %}
By creating multiple permission rules, you can give different permissions to your users based on their Role - by applying different User Roles to different permission rules.
{% endhint %}

<figure><img src="/files/GCj5LZ5mIJblZVAmtyjQ" alt=""><figcaption></figcaption></figure>

#### Which record can they see?

Decide what records users can see by selecting **Custom filter.**

<figure><img src="/files/JZHkcX1CSyr4s5LzNMl4" alt=""><figcaption></figcaption></figure>

1. **User matching -** use this filter to show records only related to the user.&#x20;

For example, choose **The record** matches the user's **\[tenants] profile.** This matches the record with the current user that is connected using the table groups.&#x20;

The format of these filters is based on a single condition that must match between the record and a user's record. You will need to use **linked fields** to set up the user matching filter.&#x20;

<figure><img src="/files/vaz1dz3vIc8bUQQQ7AiO" alt=""><figcaption></figcaption></figure>

2. **Conditions -** This setting lets you control access to records based on the record itself. For example whether its status or whether a certain field has already been filled in.

For example, here the phone number must not be empty in order for the users to view the record.&#x20;

<figure><img src="/files/r6VbFs0fFFlGi5WMF1qS" alt=""><figcaption></figcaption></figure>

#### Field access

Toggle on the **Record deletion** to allow users to delete records.&#x20;

**Create -**&#x42;y checking the whole row or a field this allows users to add new records to the data table.&#x20;

**View -** Checking the whole row or field allows users to read the field on the table.&#x20;

**Edit -** This allows users to edit the fields on the interface.

<figure><img src="/files/yeBDVbRLuB1GMYog5rnB" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.stackerhq.com/stacker-astra/manage-data-using-ai/add-user-permissions/set-up-your-permission-rule.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
