Summary
Server-side role and permission authority system for Arma Reforger (Enfusion).
Clients only send action requests; the server owns configs, role resolution, and enforcement.
Description
# AuthorityCore
Server-side role and permission authority system for Arma Reforger (Enfusion).
Clients only send action requests; the server owns configs, role resolution, and enforcement.
## Core Flow
1. Client sends `actionId|args` via BetterNetworking.
2. Server resolves the action descriptor.
3. Guard checks role/permission (default-deny if unprotected).
4. Server invokes action and logs allow/deny.
## How to Use
1) Add `RCAuthorityGameModeComponent` to your GameMode.
- Assign `RoleDatabase.conf` and `UserRoles.conf`.
- (Optional) Enable BetterNetworking permissions and set `net.admin` / `net.moderator`.
2) Create configs (BaseContainer assets).
- `RoleDatabase.conf` defines roles → permission strings.
- `UserRoles.conf` assigns player UID → roles.
- `DefaultRole` in `RoleDatabase.conf` applies to all players.
3) Create server actions.
- Extend `RCAuthorityAction`.
- **Must** AutoRegister and Bind a role/permission.
- Provide `GetActionId()` and `GetPermissionName()`.
4) Client sends action requests.
- Build payload with `RCActionPayload.Build(actionId, args)`.
- Send via `Net.Send(RCAuthorityNetOp.ActionRequest, payload)`.
5) Optional client permission queries (UI gating).
- Use `RCAuthorityClient.QueryPermission("perm.name", listener)`.
## Check the Readme! ##License
Arma Public License Share Alike (APL-SA)