From e0d8d304e476fd1d7bb69487485fbaa47dadce6b Mon Sep 17 00:00:00 2001 From: savethetreez <76013553+savethetreez@users.noreply.github.com> Date: Sat, 19 Aug 2023 09:26:13 +0200 Subject: [PATCH 1/3] Update role outputs, removes comment. --- civ13.php | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/civ13.php b/civ13.php index 814a3cde..879e27f7 100644 --- a/civ13.php +++ b/civ13.php @@ -3091,29 +3091,16 @@ public function adminlistUpdate(array $lists = [], bool $defaults = true, string { $required_roles = [ 'Owner' => ['Host', '65535'], - 'Chief Technical Officer' => ['Bishop', '65535'], - 'Host' => ['Host', '65535'], // Default Host permission, only used if another role is not found first - 'Head Admin' => ['GrandMaster', '16382'], - 'Manager' => ['Marshall', '16382'], - 'Supervisor' => ['KnightCommander', '16382'], - 'High Staff' => ['Captain', '16382'], // Default High Staff permission, only used if another role is not found first - 'Event Admin' => ['StoryTeller', '16254'], - 'Moderator' => ['Squire', '8708'], // Squires will also have the Knight role, but it takes priority - 'Admin' => ['Knight', '12158'], - 'Mentor' => ['Mentor', '16384'], - /* - 'Owner' => ['Host', '65535'], - 'Chief Technical Officer' => ['Chief Technical Officer', '65535'], + 'Chief Technical Officer' => ['CTO', '65535'], 'Host' => ['Host', '65535'], // Default Host permission, only used if another role is not found first 'Head Admin' => ['Head Admin', '16382'], 'Manager' => ['Manager', '16382'], 'Supervisor' => ['Supervisor', '16382'], 'High Staff' => ['High Staff', '16382'], // Default High Staff permission, only used if another role is not found first 'Event Admin' => ['Event Admin', '16254'], - 'Moderator' => ['Moderator', '8708'], // Moderators will also have the Knight role, but it takes priority + 'Moderator' => ['Moderator', '8708'], // Moderators will also have the Admin role, but it takes priority 'Admin' => ['Admin', '12158'], 'Mentor' => ['Mentor', '16384'], - */ ]; if (! $this->hasRequiredConfigRoles(array_keys($required_roles))) return false; if (! $file_paths = $this->getRequiredConfigFiles($postfix, $defaults, $lists)) return false; @@ -3133,4 +3120,4 @@ public function adminlistUpdate(array $lists = [], bool $defaults = true, string $this->updateFilesFromMemberRoles($callback, $file_paths, $required_roles); return true; } -} \ No newline at end of file +} From 0906d44dd8e813487420cc66559a460a5eace02f Mon Sep 17 00:00:00 2001 From: savethetreez <76013553+savethetreez@users.noreply.github.com> Date: Sat, 19 Aug 2023 09:26:13 +0200 Subject: [PATCH 2/3] Revert "Update role outputs, removes comment." This reverts commit e0d8d304e476fd1d7bb69487485fbaa47dadce6b. --- civ13.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/civ13.php b/civ13.php index 879e27f7..814a3cde 100644 --- a/civ13.php +++ b/civ13.php @@ -3091,16 +3091,29 @@ public function adminlistUpdate(array $lists = [], bool $defaults = true, string { $required_roles = [ 'Owner' => ['Host', '65535'], - 'Chief Technical Officer' => ['CTO', '65535'], + 'Chief Technical Officer' => ['Bishop', '65535'], + 'Host' => ['Host', '65535'], // Default Host permission, only used if another role is not found first + 'Head Admin' => ['GrandMaster', '16382'], + 'Manager' => ['Marshall', '16382'], + 'Supervisor' => ['KnightCommander', '16382'], + 'High Staff' => ['Captain', '16382'], // Default High Staff permission, only used if another role is not found first + 'Event Admin' => ['StoryTeller', '16254'], + 'Moderator' => ['Squire', '8708'], // Squires will also have the Knight role, but it takes priority + 'Admin' => ['Knight', '12158'], + 'Mentor' => ['Mentor', '16384'], + /* + 'Owner' => ['Host', '65535'], + 'Chief Technical Officer' => ['Chief Technical Officer', '65535'], 'Host' => ['Host', '65535'], // Default Host permission, only used if another role is not found first 'Head Admin' => ['Head Admin', '16382'], 'Manager' => ['Manager', '16382'], 'Supervisor' => ['Supervisor', '16382'], 'High Staff' => ['High Staff', '16382'], // Default High Staff permission, only used if another role is not found first 'Event Admin' => ['Event Admin', '16254'], - 'Moderator' => ['Moderator', '8708'], // Moderators will also have the Admin role, but it takes priority + 'Moderator' => ['Moderator', '8708'], // Moderators will also have the Knight role, but it takes priority 'Admin' => ['Admin', '12158'], 'Mentor' => ['Mentor', '16384'], + */ ]; if (! $this->hasRequiredConfigRoles(array_keys($required_roles))) return false; if (! $file_paths = $this->getRequiredConfigFiles($postfix, $defaults, $lists)) return false; @@ -3120,4 +3133,4 @@ public function adminlistUpdate(array $lists = [], bool $defaults = true, string $this->updateFilesFromMemberRoles($callback, $file_paths, $required_roles); return true; } -} +} \ No newline at end of file From 7000eb0a05637255c53cb4e3028723941b6466cf Mon Sep 17 00:00:00 2001 From: savethetreez <76013553+savethetreez@users.noreply.github.com> Date: Sat, 19 Aug 2023 09:37:12 +0200 Subject: [PATCH 3/3] Updates staff role outputs --- civ13.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/civ13.php b/civ13.php index 814a3cde..1460b2fd 100644 --- a/civ13.php +++ b/civ13.php @@ -3090,18 +3090,6 @@ public function factionlistUpdate(array $lists = [], bool $defaults = true, stri public function adminlistUpdate(array $lists = [], bool $defaults = true, string $postfix = '_admins'): bool { $required_roles = [ - 'Owner' => ['Host', '65535'], - 'Chief Technical Officer' => ['Bishop', '65535'], - 'Host' => ['Host', '65535'], // Default Host permission, only used if another role is not found first - 'Head Admin' => ['GrandMaster', '16382'], - 'Manager' => ['Marshall', '16382'], - 'Supervisor' => ['KnightCommander', '16382'], - 'High Staff' => ['Captain', '16382'], // Default High Staff permission, only used if another role is not found first - 'Event Admin' => ['StoryTeller', '16254'], - 'Moderator' => ['Squire', '8708'], // Squires will also have the Knight role, but it takes priority - 'Admin' => ['Knight', '12158'], - 'Mentor' => ['Mentor', '16384'], - /* 'Owner' => ['Host', '65535'], 'Chief Technical Officer' => ['Chief Technical Officer', '65535'], 'Host' => ['Host', '65535'], // Default Host permission, only used if another role is not found first @@ -3110,10 +3098,9 @@ public function adminlistUpdate(array $lists = [], bool $defaults = true, string 'Supervisor' => ['Supervisor', '16382'], 'High Staff' => ['High Staff', '16382'], // Default High Staff permission, only used if another role is not found first 'Event Admin' => ['Event Admin', '16254'], - 'Moderator' => ['Moderator', '8708'], // Moderators will also have the Knight role, but it takes priority + 'Moderator' => ['Moderator', '8708'], // Moderators will also have the Admin role, but it takes priority 'Admin' => ['Admin', '12158'], 'Mentor' => ['Mentor', '16384'], - */ ]; if (! $this->hasRequiredConfigRoles(array_keys($required_roles))) return false; if (! $file_paths = $this->getRequiredConfigFiles($postfix, $defaults, $lists)) return false;