# Roles

Assign user groups to different permissions and users by creating roles.&#x20;

## Create User Roles

1. Click <img src="/files/2cw5fvUjZl8AwRzMwTi8" alt="" data-size="line">**App settings**
2. Click **Roles**
3. Click **Enable Roles**
4. Click **+Add Roles**
5. Add a name for your role
6. Select which pages you want to give the role access to

{% hint style="info" %}
Checking the "Can read/modify all data" means your role will not appear in the permissions table and can read/modify all data in the app. Uncheck this if you want to apply permissions to your roles.
{% endhint %}

### Setup your data for roles

1. Go to<img src="/files/xCkvVa1dO3F7n6fTHS3C" alt="" data-size="line">**Manage Fields and Data**
2. Go to your connected Users table
3. Add a dropdown field titled “Role”&#x20;
4. Assign your users a “Role” on the table

### Use Table Groups to Assign Roles

1. Go to<img src="/files/7EUqFlfRbTO9IiyMQE2r" alt="" data-size="line">**Manage Users**
2. Select **Create table group**
3. Select the table
4. Assign this group a role
5. Select the field with the email addresses of the users
6. Set a data filter (optional)&#x20;

{% hint style="info" %}
You can use field conditions to determine a user's role, for example, if the field **Position** is **Director** assign the role **Director.**&#x20;
{% endhint %}


---

# 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/security/roles.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.
