Add Permission System

pietru 2025-02-27 13:04:34 +01:00
parent fbcd36df5c
commit 7deb2d2323

35
Permission-System.md Normal file

@ -0,0 +1,35 @@
Cookie Utils permission system uses groups for assigning permissions.
Plugin will always try to create permission group called `default` if it doesn't exist already, file with name `default.json` in location `server_folder/perm_groups/` will always have id `default`.
Default groups is one that is used for players that don't have group assigned by authorized person.
Each user can have assigned at max 1 group.
Group json file needs to contain:
- `group_id` - unique string without spaces that will be used for assigning that group to users via cmd.
- `group_DisplayName` - Display Name for the group, it can contain spaces.
- `group_Desc` - Description of group, you can place here.
- `perms` - Array of strings of permissions, some commands might require specifing advance perms like `main_perm.sub_perm.next_sub_perm`.
> **Note**
> The `*` can be used to give access to all cmds and or all sub permissions of any permission.
### Default perm
```json
{
"group_id": "default",
"group_DisplayName": "Default Group",
"group_Desc": "The default user rank...",
"perms": [
"help",
"gpos",
"my_rank",
"my_zone",
"my_id",
"my_name",
"perm_code",
"perm_clear"
]
}
```