Skip to content

Permissions ​

Description ​

Permissions control player and administrator access to features that check these identifiers. The configuration assigns Steam IDs to groups and lets you define permissions shared by all players.

Configuration ​

Default configuration ​

Permissions.json
json
{
  "m_Groups": [
    {
      "m_Name": "superadmin",
      "m_ForceName": 0,
      "m_Users": [
        {
          "m_Name": "Player Name",
          "m_Steam": "00000000000000000"
        }
      ],
      "m_Permissions": [
        "root"
      ]
    }
  ],
  "m_Everyone": []
}

Options ​

OptionTypeDescription
m_Groupsarray<object>Player groups. A player can receive permissions from multiple groups; there is no inheritance based on group names.
m_Everyonearray<string>Permissions granted to every player, including group members. To grant a permission only to administrators, place it in the corresponding group.

m_Groups[] ​

OptionTypeDescription
m_NamestringAdministrative group name. The name "superadmin" does not grant privileges by itself.
m_ForceNameboolWith 0, a matching Steam ID is enough. With 1, the player’s current name must also exactly match m_Users[].m_Name to receive this group’s permissions. Checks the name; it does not rename the character.
m_Usersarray<object>Players belonging to the group. Replace the example entry with the administrator’s actual name and Steam ID.
m_Permissionsarray<string>Permissions added to accepted group members. Use the exact identifiers documented below.

m_Groups[].m_Users[] ​

OptionTypeDescription
m_NamestringName associated with the entry. When m_ForceName is 1, it is also used to check the current name. The first accepted group entry with a nonempty name supplies the display name to the permission system.
m_SteamstringThe player’s 17-digit Steam ID, in quotes. The full value is compared: enter only the Steam ID, without comments or suffixes.

How permissions are combined ​

The player first receives permissions from m_Everyone, followed by those from every group where their entry is accepted. Group order does not remove permissions already received.

Identifiers are compared literally and are case-sensitive. Use lowercase names as documented. Wildcards such as command.* or admin.* are not expanded, and there is no automatic inheritance: admin alone does not grant every admin.* permission.

The root permission makes every permission check return true. Grant it only to users who should have full administrative access; placing it in m_Everyone grants that access to everyone.

Command permissions ​

Commands submitted through Chat check command.<name>, without the / prefix or arguments. For example:

PermissionAction
command.kickUse /kick.
command.reloadUse /reload, including reloading permissions and other modules.
command.teleportUse /teleport.

See Commands for the permissions and syntax of available commands. Granting a permission does not enable a disabled module or replace the command’s requirements.

Admin permissions ​

PermissionAction
adminAllows enabling admin mode. The actions below may require this mode to be active as well as their specific permission.
admin.clipboardAllows copying, cutting and pasting objects through admin tools.
admin.deleteAllows deleting objects through admin tools.
admin.freecamAllows toggling the admin free camera.
admin.map.playersAllows viewing players on the admin map.
admin.map.teleportAllows teleporting through the map using the corresponding admin action.
admin.moveobjectAllows moving objects through admin tools.
admin.nvgAllows toggling admin night vision.
admin.teleportAllows teleporting to the position indicated by the cursor.

Module access ​

The modules below check <module>.allow and <module>.deny at the indicated points. These permissions are not a universal rule for every module or operation.

PermissionsCheck
chatmenu.allow, chatmenu.denyOpening the Chat menu.
map.allow, map.denyOpening the map through the Map module.
garage.allow, garage.denyOpening the garage menu after receiving its data.
spawnselection.allow, spawnselection.denyAccess to spawn selection checked on the server.

The check follows this priority:

  1. If the player has .allow, access is granted.
  2. Otherwise, if they have .deny, access is denied.
  3. With neither permission, access is granted.

If both are present, .allow wins. Since root also satisfies the .allow check, it grants access even when .deny is present.

To restrict the map to a group, for example, add map.deny to m_Everyone and map.allow to the authorized group. The Banking module does not check banking.allow or banking.deny.

Configuration example ​

In this example, the owner receives root, the moderator can use /kick and /reload, and the map is available only to these two groups. Steam IDs are illustrative; replace them with actual IDs.

json
{
  "m_Groups": [
    {
      "m_Name": "superadmin",
      "m_ForceName": 0,
      "m_Users": [
        {
          "m_Name": "Server Owner",
          "m_Steam": "76561198000000001"
        }
      ],
      "m_Permissions": [
        "root"
      ]
    },
    {
      "m_Name": "moderator",
      "m_ForceName": 0,
      "m_Users": [
        {
          "m_Name": "Moderator",
          "m_Steam": "76561198000000002"
        }
      ],
      "m_Permissions": [
        "command.kick",
        "command.reload",
        "map.allow"
      ]
    }
  ],
  "m_Everyone": [
    "map.deny"
  ]
}

Commands ​

/reload permissions ​

Reads Permissions.json again and sends updated permissions to connected players. The configuration is stored in $profile:AC/Permissions.json, where $profile: is the server profile directory.

  • Syntax: /reload permissions
  • Arguments: permissions identifies the permission system to reload.
  • Permission: command.reload or root.
  • Example: /reload permissions

The initial administrator configuration can be applied by restarting the server. To reload through chat, the player running the command must already have one of the permissions above before reloading.

Released under the MIT License.