Skip to main content
UgCore permissions are FiveM ACEs, and UgCore groups are ACE principals. Every ACE check sees them, including IsPlayerAceAllowed in other resources and the permission option of callbacks, net events and commands.

Setup

ug-core needs permission to run add_ace, add_principal and their remove_ versions. Grant those four and nothing else:
server.cfg
The txAdmin recipe writes these lines to permissions.cfg. add_ace resource.ug-core command allow also works, but grants every command. Without them, boot prints ug-core cannot run add_ace. Add add_ace resource.ug-core command allow to server.cfg. in red, and nothing can be applied.

Groups

Define your staff groups in config/permissions.lua. ug-core generates it with three groups:
config/permissions.lua
Group names are lowercase letters, digits and underscores. Each group becomes the principal group.<name>: on boot, ug-core runs add_ace group.admin ug.admin allow for each permission, and add_principal group.admin group.moderator for inherits.
The groups option replaces the default groups entirely, so it MUST list every group you want. Invalid groups and inheritance cycles, such as a -> b -> a, stop boot with a clear error.

Add players to groups

Admin menus and commands add and remove members at runtime. Memberships are stored in ug_group_members and applied again on every boot:
A member gets add_principal identifier.license:abc123 group.admin, so the player has every permission of admin and of the groups it inherits.

Weight

ACE has no ranking, so groups have a weight. Admin menus use it to stop a moderator from kicking an admin:
A player’s weight is the highest weight of their groups. CanTarget needs a strictly higher weight. The server console outranks everyone.

Changing groups

  • New groups and permissions apply on restart ug-core.
  • Removed groups and permissions stay in the ACL until the server restarts, since FXServer keeps ACEs and principals across resource restarts.
  • Removing a group from the config never deletes its members. They are kept, not applied, and boot warns about them. Add the group back and they apply again.

server.cfg still works

Groups and principals from server.cfg keep working next to UgCore groups. A config group with the same name, such as admin, adds its permissions to the one in server.cfg.
server.cfg
IsInGroup, GetGroups, GetWeight and CanTarget only know memberships managed by UgCore. A player added to group.admin in server.cfg has the permissions, but no UgCore weight. Use AddGroup for staff.

Single permissions

Give one permission to one player, without a group:
Grants are stored in ug_permissions. UgCore.Permissions.Has(source, permission) is a plain ACE check, so groups, grants and server.cfg all count.

Commands

Chat commands accept a permission, a list of groups, or both. Any listed group is enough, and inheritance counts:
See Commands.

Inspect

Permissions used by ug-core

Resources declare their own permissions on callbacks, net events and commands with the permission option.

Safety

Group names, permissions and identifiers end up in a server command, so UgCore only accepts letters, digits, dots, dashes and underscores, and type:value identifiers. Anything else raises, or stops boot when it comes from the config, before reaching ExecuteCommand.