> For the complete documentation index, see [llms.txt](https://cde-inc.gitbook.io/cde-cad-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cde-inc.gitbook.io/cde-cad-documentation/fivem-developer-integration/permissions.md). Agents can also search and read this documentation through its [MCP server](https://cde-inc.gitbook.io/cde-cad-documentation/~gitbook/mcp).

# Permissions

Two endpoints describe who can do what. Fetch the community policy once when your resource starts and cache it; resolve each officer as needed.

Use the two together to show or hide buttons in your terminal. That gating is UX only. The action endpoints (warrant lifecycle, BOLO removal, call self-assign) enforce the same policy server-side, so a modified or misconfigured resource cannot get past a role. An officer whose Discord ID cannot be resolved comes back `identified: false` with no levels; treat them as unidentified and hide gated actions.

`evidence.create` is `officer`, but the evidence locker also requires department access, so a member without a department is still refused. See [Evidence](https://cde-inc.gitbook.io/cde-cad-documentation/fivem-developer-integration/evidence.md).

Access levels, low to high: `officer` (any community member), `dispatch`, `supervisor`, `legal`, `judicial`, `admin`. `admin` satisfies every level.

## Community Permission Config

```
GET /api/fivem/community/permission-config
```

The community's action-to-required-level policy. Cache it and refresh periodically so admin changes apply without a resource restart.

### Response

```json
{
  "success": true,
  "policy": {
    "bolo":     { "view": "officer", "create": "supervisor", "remove": "supervisor" },
    "warrant":  { "view": "officer", "create": "judicial", "manage": "judicial" },
    "citation": { "view": "officer", "create": "officer" },
    "charges":  { "view": "officer" },
    "records":  { "view": "officer" },
    "dispatch": { "selfAssign": "officer" },
    "evidence": { "create": "officer" }
  },
  "levels": ["officer", "dispatch", "supervisor", "legal", "judicial", "admin"],
  "updatedAt": "2026-08-07T14:35:00.000Z"
}
```

## Resolve Officer Permissions

```
GET /api/fivem/user/permissions?discordId=DISCORD_USER_ID
```

Resolves one officer's access level from their Discord ID.

### Response

```json
{
  "success": true,
  "identified": true,
  "discordId": "1234567890",
  "username": "Officer Smith",
  "isMember": true,
  "levels": ["supervisor", "dispatch"],
  "flags": { "admin": false, "supervisor": true, "judicial": false, "legal": false, "dispatch": true }
}
```

An unresolvable or non-member Discord ID returns `identified: false`, `isMember: false`, and empty `levels`.
