> For the complete documentation index, see [llms.txt](https://docs.tworst.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tworst.com/getting-started-installation/admin-menu/admin-menu/permissions.md).

# Permissions & Roles

The Admin Menu uses a **role-based permission system**. Each staff member has a role, and that role defines exactly what they can see and do — in-game, in the web panel, and from the Discord bot.

{% hint style="success" %}
Roles and permissions are shared across all three components. A "moderator" has the same powers whether they act in-game, on the web panel, or via Discord.
{% endhint %}

***

## Built-in Roles

The Admin Menu ships with 5 ready-to-use roles, ordered from highest to lowest rank:

| Role          | Rank    | Color  | Scope                                                |
| ------------- | ------- | ------ | ---------------------------------------------------- |
| **owner**     | Highest | Red    | Full access — manage staff, roles, and every feature |
| **admin**     | High    | Purple | Most features — can manage staff                     |
| **moderator** | Medium  | Blue   | Moderate players, view data                          |
| **support**   | Low     | Green  | Support & tickets focused                            |
| **trial**     | Lowest  | Yellow | View-only, no actions                                |

### Role Priority (Ranking)

Each role has a **priority** that determines its rank — a higher-priority role outranks a lower one (e.g. an admin can manage a moderator, but not the other way around).

{% hint style="info" %}
You don't edit priority numbers by hand. On the in-game **Admin → Roles** page, simply **drag roles up or down** to reorder them — the higher a role sits in the list, the higher its rank. The order applies everywhere (in-game, web panel, Discord bot).
{% endhint %}

{% hint style="info" %}
Built-in roles are **protected** — they can't be deleted, but you can reorder them and create custom roles alongside them.
{% endhint %}

***

## God Access

God access bypasses the role system entirely and grants full control — use it for owners and lead developers.

```lua
TW.GodRole = "owner"            -- The role assigned to god users
TW.GodIdentifiers = {
    "fivem:1234567",
    "discord:123456789012345",
}
```

Anyone whose `fivem:` or `discord:` identifier is listed in `TW.GodIdentifiers` is automatically provisioned with the God role and full access when they join.

{% hint style="warning" %}
Set up at least one god identifier during installation — it's how you bootstrap the first admin and start adding staff.
{% endhint %}

***

## Permission Groups

Permissions are organized into groups. A role grants any combination of permissions across these groups:

| Group                               | Covers                                                             |
| ----------------------------------- | ------------------------------------------------------------------ |
| **home**                            | Dashboard access                                                   |
| **player**                          | All player actions (kick, ban, teleport, heal, money, etc.)        |
| **vehicle**                         | Vehicle spawn, repair, mods, impound, delete                       |
| **server**                          | Console, commands, restart, stop, database backup                  |
| **admin**                           | Staff & role management                                            |
| **resources**                       | View & manage server resources                                     |
| **logs**                            | View/delete logs, force duty                                       |
| **data**                            | Items, rich list, ban list, jail list, whitelist, exports, replays |
| **tickets**                         | Ticket handling                                                    |
| **world**                           | Weather, time, world flags                                         |
| **events / polls / announcements**  | Engagement tools                                                   |
| **blips / jobs / teams / invoices** | Map markers, jobs, groups, billing                                 |
| **troll**                           | Troll menu actions                                                 |
| **dashboard**                       | Server metrics & history                                           |

***

## High-Risk Permissions

Certain permissions are flagged as **high-risk** and are always written to the audit log when used — for example: `command`, `ban`, `give_item`, `wipe_inventory`, `kill`, `set_money`, `edit_identity`, `live_view`, `restart`, `stop`, `manage_staff`, `manage_roles`, and `delete`.

{% hint style="info" %}
High-risk actions can also be routed to a dedicated Discord webhook channel — see [Configuration → webhooks](/getting-started-installation/admin-menu/admin-menu/configuration.md#shared-webhooks-lua).
{% endhint %}

***

## Custom Roles

From the in-game **Admin → Roles** page (or the web panel), users with `manage_roles` can:

* **Create** a new role with a custom permission matrix
* **Edit** a role's name, color, and permissions
* **Reorder** roles by dragging them up/down to set their rank
* **Delete** custom roles (built-in roles are protected)

Then, on the **Admin → Staff** page, assign roles to staff by identifier and optionally grant or revoke individual permissions to override the role.

***

## Off-Duty Access

Control what admins can do while off-duty:

```lua
TW.DefaultOnDuty = false      -- New admins start off-duty
TW.OffDutyAccess = "full"     -- "full" | "readonly" | "duty"
```

| Mode       | Behavior off-duty                               |
| ---------- | ----------------------------------------------- |
| `full`     | Full access regardless of duty status           |
| `readonly` | Can view everything, but cannot perform actions |
| `duty`     | Must go on-duty before using the menu           |
