> ## Documentation Index
> Fetch the complete documentation index at: https://zyra-store.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure ACE permissions for Zyra Store FiveM scripts

> Define groups, assign ACE entries in server.cfg, and map them in config.lua to control which players can use each Zyra Store function.

Zyra Store scripts use FiveM's native permission system, known as **ACE (Access Control Entries)**, to determine which players can execute privileged commands, access administration menus, or enjoy VIP features. You do not need any external permission resource: everything is managed directly from your `server.cfg` and the `Config.Permissions` block in the configuration file.

## How ACE permissions work

FiveM includes an integrated access control engine on the server that operates with two main concepts:

* **Groups (`add_group`)** — sets of players that share the same privileges (e.g. `admin`, `mod`, `vip`).
* **Access entries (`add_ace`)** — rules that grant or deny a specific permission to a group or principal.
* **Principals (`add_principal`)** — assignment of a specific player (identified by their Steam ID, license, etc.) to a group.

When the script checks whether a player has permission to perform an action, it evaluates whether the group that player belongs to has been granted the corresponding ACE entry.

## Configure groups in server.cfg

Add the following lines to your `server.cfg`, adapting the player identifiers to those of your server:

```cfg server.cfg theme={null}
# Define groups
add_group admin
add_group mod
add_group vip

# Assign permissions to admin group
add_ace group.admin zyra.admin allow
add_ace group.admin zyra.mod allow

# Assign permissions to mod group
add_ace group.mod zyra.mod allow

# Assign players to groups (by steam ID or license)
add_principal identifier.steam:110000XXXXXXXXX group.admin
add_principal identifier.license:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX group.admin
```

Note that the `admin` group receives both `zyra.admin` and `zyra.mod`, giving it access to all moderation functions in addition to administrator-only features. The `mod` group only receives `zyra.mod`.

## Configure in config.lua

The `Config.Permissions` block in `shared/config.lua` tells the script which ACE group name to check for each privilege level:

```lua shared/config.lua theme={null}
Config.Permissions = {
    admin  = 'group.admin',   -- ACE group with administrator permissions
    mod    = 'group.mod',     -- ACE group with moderator permissions
    vip    = 'group.vip',     -- ACE group with VIP permissions
}
```

If your server uses different group names (for example `group.superadmin` instead of `group.admin`), simply update the corresponding value in this block. The script will always query the name you define here, so it is not necessary to modify any other file.

## Permission levels

The following table summarizes the three available access levels and their correspondence with the configuration keys and recommended ACE groups:

| Level | Key in config.lua | Suggested ACE | Access |
| - | - | - | - |
| **admin** | `Config.Permissions.admin` | `group.admin` | All script commands and functions, including settings, restarts, and diagnostic tools. |
| **mod** | `Config.Permissions.mod` | `group.mod` | Moderation commands: player management, log review, and disciplinary actions. |
| **vip** | `Config.Permissions.vip` | `group.vip` | Special features reserved for VIP players, such as exclusive menus or cooldown reduction. |

> [!NOTE]
>
> If you use **txAdmin** to manage your server, you can take advantage of its role system instead of configuring `add_principal` manually. txAdmin roles are automatically translated to ACE groups, so it is enough to assign the correct role to each administrator from the txAdmin panel for Zyra Store scripts to recognize their permissions without additional changes in `server.cfg`.

## Available commands

Zyra Store scripts expose the following chat commands. Each one requires the player to belong to the ACE group indicated; if they do not have the necessary permission, they will receive an access denied notice.

| Command | Required permission | Description |
| - | - | - |
| `/script-admin` | `Config.Permissions.admin` | Opens the script administration panel: live settings, statistics, and diagnostic tools. |
| `/reload-config` | `Config.Permissions.admin` | Reloads the `shared/config.lua` file without needing to restart the full resource. Useful for applying configuration changes quickly. |
| `/toggle-feature [name]` | `Config.Permissions.admin` | Enables or disables on the fly a feature defined in `Config.Features`. For example: `/toggle-feature discord_logs`. |

To test that a player has the correct permission before assigning it in production, you can use FiveM's native command in the server console:

```text theme={null}
test_ace identifier.steam:110000XXXXXXXXX zyra.admin
```

It returns `true` if that identifier has been granted the `zyra.admin` ACE, or `false` otherwise.

***

See also:

* [Commands reference](https://zyra-store.mintlify.site/en/reference/commands.md) — complete list of commands and the permission level required to execute them.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.