From 7deb2d232384eb139f121418c6522cb3d6bb5939 Mon Sep 17 00:00:00 2001 From: pietru Date: Thu, 27 Feb 2025 13:04:34 +0100 Subject: [PATCH] Add Permission System --- Permission-System.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Permission-System.md diff --git a/Permission-System.md b/Permission-System.md new file mode 100644 index 0000000..5eb200e --- /dev/null +++ b/Permission-System.md @@ -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" + ] +} +``` \ No newline at end of file