Skip to main content
Permissions decide what an officer can do once the MDT is open. They’re set per job and per grade, and saved in config/permissions.json.

How access works

Two checks decide what an officer can do. Both must pass.
  1. Whitelist: the officer’s job must be whitelisted. Without it, the MDT doesn’t open. See Departments.
  2. Permission: the officer’s grade must have the permission for the action, such as incidents.create to file an incident.
A whitelisted job with no permissions opens the MDT, but nothing in it unlocks.
Duty is a separate setting. With Config.RequireDuty on, officers must be on duty to open the MDT. It doesn’t change which permissions a grade has.

Grades inherit permissions

A permission applies to its grade and every grade above it. You never repeat a permission on higher grades.
config/permissions.json
Put each permission on the lowest grade that should have it. Grade 3 above has no list of its own and still inherits everything below it.

Edit permissions

Pick the method that suits you. All three write to the same config/permissions.json, and changes made in game apply instantly.
Server admins can edit every job, without needing a job themselves.
1

Open the admin panel

Run /mdtadmin in game and open Permissions.
2

Pick a job

Choose the job you want to edit. Only whitelisted jobs are listed.
3

Set the lowest grade

For each permission, choose the lowest grade that gets it. Higher grades inherit it automatically.
Permissions section of the admin panel with a job selected

Editing a job's permissions in the admin panel

Add a new job

When you whitelist a job in Access in the admin panel, you can copy the permissions of an existing job as a starting point. Then fine-tune them in Permissions. To do it by hand, add the job to Config.WhitelistedJobs, then copy the police block in config/permissions.json and rename it. The grade numbers must match the job’s grades in your framework.
config/permissions.json

Your own permissions

A permission is just a string. Your own pages and scripts can use new ones, such as wiki.view.
  • Add it to a grade in config/permissions.json, like any built-in permission. The in-game editors only list built-in permissions.
  • Use your own prefix, such as myplugin.view, so it never clashes with a built-in permission.
To check a permission from your own server script, use HasAccess. It checks the whitelist and the permission together.
server.lua

All permissions