> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_banners/configs/permissions.md).

# Permissions

Step-by-step explanation guide on how permissions work in our banners resource.

Permissions determine who has access to specific banners and what they can do with them.

Path: `rcore_banners/configs/permissions.lua`

Our resource uses permissions based on user group. We have premade groups for the ESX/QBCore admin groups:

* **QBCore:** `god`, `admin`
* **ESX:** `superadmin`, `admin`

<details>

<summary>Config.Permissions</summary>

* **Type:** `table`
* **Description:** Per-group permissions for the dashboard UI and work stations.

```lua
Config.Permissions = {
    Groups = {
        ['superadmin'] = {
            [WORKSTATION_PERMS.CAN_SET_BANNER] = true,
            [WORKSTATION_PERMS.CAN_PRODUCE_BANNER] = true,
            [WORKSTATION_PERMS.CAN_UPDATE_TARGET_BATCH] = true,
            [WORKSTATION_PERMS.CAN_STOP_TARGET_PRODUCTION] = true,

            [WORKSTATION_PERMS.ACCESS_WORKSTATION_CUSTOM] = true,
            [WORKSTATION_PERMS.ACCESS_WORKSTATION_BANNER_CREATION] = true,
            [WORKSTATION_PERMS.ACCESS_WORKSTATION_MANAGEMENT] = true,

            [APP_PERMS.ACCESS_CUSTOM_BANNER] = true,
            [APP_PERMS.ACCESS_ARCHIVE_BANNER] = true,
        },
        ['god'] = {
            [WORKSTATION_PERMS.CAN_SET_BANNER] = true,
            [WORKSTATION_PERMS.CAN_PRODUCE_BANNER] = true,
            [WORKSTATION_PERMS.CAN_UPDATE_TARGET_BATCH] = true,
            [WORKSTATION_PERMS.CAN_STOP_TARGET_PRODUCTION] = true,

            [WORKSTATION_PERMS.ACCESS_WORKSTATION_CUSTOM] = true,
            [WORKSTATION_PERMS.ACCESS_WORKSTATION_BANNER_CREATION] = true,
            [WORKSTATION_PERMS.ACCESS_WORKSTATION_MANAGEMENT] = true,

            [APP_PERMS.ACCESS_CUSTOM_BANNER] = true,
            [APP_PERMS.ACCESS_ARCHIVE_BANNER] = true,
        },
        ['admin'] = {
            [APP_PERMS.ACCESS_CUSTOM_BANNER] = true,
            [APP_PERMS.ACCESS_ARCHIVE_BANNER] = true,
        }
    }
}
```

</details>

## Type of permissions

### Dashboard

Permissions related to the `rcore_banners` dashboard UI (`/banners`).

<details>

<summary><code>APP_PERMS.ACCESS_CUSTOM_BANNER</code></summary>

Allows the player to create new server-global banners.

</details>

<details>

<summary><code>APP_PERMS.ACCESS_ARCHIVE_BANNER</code></summary>

Allows the player to access the archive page, where all stored banners can be restored or deleted.

</details>

### Work stations (printers)

Permissions related to the `rcore_banners` business (work stations).

<details>

<summary><code>WORKSTATION_PERMS.CAN_PRODUCE_BANNER</code></summary>

Allows the player to produce a banner at the work station.

</details>

<details>

<summary><code>WORKSTATION_PERMS.CAN_SET_BANNER</code></summary>

Allows the player to choose which banner is produced on the specific printer they're at.

</details>

<details>

<summary><code>WORKSTATION_PERMS.CAN_UPDATE_TARGET_BATCH</code></summary>

Allows the player to update the active printer's batch to a specific amount.

</details>

<details>

<summary><code>WORKSTATION_PERMS.CAN_STOP_TARGET_PRODUCTION</code></summary>

Allows the player to stop the printer's current active production.

</details>

<details>

<summary><code>WORKSTATION_PERMS.ACCESS_WORKSTATION_CUSTOM</code></summary>

Allows the player to open the page where a new business banner can be created.

</details>

<details>

<summary><code>WORKSTATION_PERMS.ACCESS_WORKSTATION_MANAGEMENT</code></summary>

Allows the player to access the work station management menu.

</details>
