# Permissions

We use built-in ACE permissions to handle player access to certain parts of the script.

You can find the settings in `permissions.lua`

```lua
PermissionMap = {
    ['group.superadmin'] = {
        -- Can reset player's stats (keep only for higher roles as this will completely reset all statistics and achievements of a player)
        Permissions.RESET_PLAYERS_STATS,
    },
    ['group.admin'] = {
        Permissions.OPEN_CONTROL,           -- Can open control panel to see all stat types
        Permissions.TOGGLE_STAT_TYPE,       -- Can turn on and off stat types
        Permissions.SEE_OTHER_PLAYER_STATS, -- Can see other player stats
        Permissions.SEE_SERVER_STATS,       -- Can see server stats
    },
    ['builtin.everyone'] = {                --Everyone
        Permissions.OPEN_UI,                -- Can open the UI
    }
}
```

## Groups

The `['group.admin']` is the name of the group you want to set it to.

The permissions inside that group are the permissions that the group will be allowed to use.

The `builtin.everyone` group is for everyone.

## Permissions types

* `Permissions.RESET_PLAYERS_STATS` - Can reset player's stats (keep only for higher roles as this will completely reset all statistics and achievements of a player)
* `Permissions.OPEN_CONTROL` - Can open control panel to see all stat types
* `Permissions.TOGGLE_STAT_TYPE` - Can turn on and off stat types
* `Permissions.SEE_OTHER_PLAYER_STATS` - Can see other player stats
* `Permissions.SEE_SERVER_STATS` - Can see server stats
* `Permissions.OPEN_UI` - Can open the UI, everyone should have this one


---

# 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://documentation.rcore.cz/paid-resources/rcore_stats/permissions.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.
