group.<name>. Both are stored in the database and applied again on every boot, so every ACE check agrees, including IsPlayerAceAllowed and the permission option of callbacks, net events and commands.
target is a player source or an identifier such as license:abc. Identifiers work for offline players. Permission names are letters, digits, dots, dashes and underscores, such as my-garage.admin.
Groups
Staff groups with weights, inheritance and targeting.
Single permissions
Has
server.cfg all count.
Grant
Revoke
removed is false when it was not granted. ACEs from server.cfg and groups stay.
GetAll
Grant, sorted. Group permissions and ACEs from server.cfg are not listed.
Errors
Malformed targets, group names and permission names raise.
Events
They carry the identifier, since the target MAY be offline.
Hooks
They allow or cancel. Changes to the payload are ignored.
Statebags
Index them withUgCore.Enums.StateBags. See Statebags.
Clients read it to show a staff badge:
client.lua
Player object
Every function above has a player object shortcut:player:AddGroup('admin'), player:IsInGroup('moderator'), player:CanTarget(other).
Requirements
ug-core MUST be allowed to runadd_ace, remove_ace, add_principal and remove_principal. See Permissions setup. ug-core reports it at boot when it is missing.