Skip to main content
Server Proxied to ug-core. See Permissions and groups for the owner side. Permissions are FiveM ACEs, groups are ACE principals 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

A plain ACE check: groups, grants and server.cfg all count.

Grant

MUST run in a thread. Applies the ACE right away.

Revoke

MUST run in a thread. removed is false when it was not granted. ACEs from server.cfg and groups stay.

GetAll

Permissions granted with 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 with UgCore.Enums.StateBags. See Statebags. Clients read it to show a staff badge:
client.lua
Never trust a client’s view of its own groups. Check permissions on the server.

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 run add_ace, remove_ace, add_principal and remove_principal. See Permissions setup. ug-core reports it at boot when it is missing.