From a5f5b447983e440624b46bb01b1475b42218ebd1 Mon Sep 17 00:00:00 2001 From: MikChan <18665545+Mik-chan@users.noreply.github.com> Date: Thu, 19 Mar 2020 01:06:55 +0300 Subject: [PATCH] Fixed Admin permissions --- core/userclass.php | 76 +++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 25 deletions(-) diff --git a/core/userclass.php b/core/userclass.php index b5409b25..571eb6f1 100644 --- a/core/userclass.php +++ b/core/userclass.php @@ -189,62 +189,86 @@ new UserClass("user", "base", [ Permissions::READ_PM => true, ]); -new UserClass("admin", "base", [ - Permissions::CHANGE_SETTING => true, - Permissions::OVERRIDE_CONFIG => true, - Permissions::BIG_SEARCH => true, - Permissions::EDIT_IMAGE_LOCK => true, - Permissions::VIEW_IP => true, - Permissions::BAN_IP => true, - Permissions::EDIT_USER_NAME => true, - Permissions::EDIT_USER_PASSWORD => true, - Permissions::EDIT_USER_INFO => true, - Permissions::EDIT_USER_CLASS => true, - Permissions::DELETE_USER => true, - Permissions::CREATE_IMAGE => true, - Permissions::DELETE_IMAGE => true, - Permissions::BAN_IMAGE => true, - Permissions::CREATE_COMMENT => true, - Permissions::DELETE_COMMENT => true, - Permissions::BYPASS_COMMENT_CHECKS => true, - Permissions::REPLACE_IMAGE => true, +new UserClass("admin", "base", [ Permissions::CHANGE_SETTING => true, + Permissions::OVERRIDE_CONFIG => true, + Permissions::BIG_SEARCH => true, + Permissions::MANAGE_EXTENSION_LIST => true, Permissions::MANAGE_ALIAS_LIST => true, Permissions::MANAGE_AUTO_TAG => true, + Permissions::MASS_TAG_EDIT => true, + + Permissions::VIEW_IP => true, + Permissions::BAN_IP => true, + + Permissions::CREATE_USER => true, + Permissions::EDIT_USER_NAME => true, + Permissions::EDIT_USER_PASSWORD => true, + Permissions::EDIT_USER_INFO => true, + Permissions::EDIT_USER_CLASS => true, + Permissions::DELETE_USER => true, + + Permissions::CREATE_COMMENT => true, + Permissions::DELETE_COMMENT => true, + Permissions::BYPASS_COMMENT_CHECKS => true, + + Permissions::REPLACE_IMAGE => true, + Permissions::CREATE_IMAGE => true, Permissions::EDIT_IMAGE_TAG => true, Permissions::EDIT_IMAGE_SOURCE => true, Permissions::EDIT_IMAGE_OWNER => true, + Permissions::EDIT_IMAGE_LOCK => true, Permissions::EDIT_IMAGE_TITLE => true, + Permissions::EDIT_IMAGE_RELATIONSHIPS => true, + Permissions::EDIT_IMAGE_ARTIST => true, Permissions::BULK_EDIT_IMAGE_TAG => true, Permissions::BULK_EDIT_IMAGE_SOURCE => true, - Permissions::MASS_TAG_EDIT => true, + Permissions::DELETE_IMAGE => true, + + Permissions::BAN_IMAGE => true, + + Permissions::VIEW_EVENTLOG => true, + Permissions::IGNORE_DOWNTIME => true, + Permissions::CREATE_IMAGE_REPORT => true, - Permissions::VIEW_IMAGE_REPORT => true, + Permissions::VIEW_IMAGE_REPORT => true, + Permissions::WIKI_ADMIN => true, Permissions::EDIT_WIKI_PAGE => true, Permissions::DELETE_WIKI_PAGE => true, - Permissions::VIEW_EVENTLOG => true, + Permissions::MANAGE_BLOCKS => true, + Permissions::MANAGE_ADMINTOOLS => true, - Permissions::IGNORE_DOWNTIME => true, + Permissions::SEND_PM => true, Permissions::READ_PM => true, - Permissions::VIEW_OTHER_PMS => true, + Permissions::VIEW_OTHER_PMS => true, # hm Permissions::EDIT_FEATURE => true, Permissions::BULK_EDIT_VOTE => true, Permissions::EDIT_OTHER_VOTE => true, Permissions::VIEW_SYSINTO => true, + + Permissions::HELLBANNED => false, Permissions::VIEW_HELLBANNED => true, - Permissions::PROTECTED => true, + + Permissions::PROTECTED => true, + Permissions::EDIT_IMAGE_RATING => true, Permissions::BULK_EDIT_IMAGE_RATING => true, + Permissions::VIEW_TRASH => true, + Permissions::PERFORM_BULK_ACTIONS => true, + Permissions::BULK_ADD => true, Permissions::EDIT_FILES => true, Permissions::EDIT_TAG_CATEGORIES => true, Permissions::RESCAN_MEDIA => true, Permissions::SEE_IMAGE_VIEW_COUNTS => true, + + Permissions::EDIT_FAVOURITES => true, + Permissions::ARTISTS_ADMIN => true, Permissions::BLOTTER_ADMIN => true, Permissions::FORUM_ADMIN => true, @@ -252,8 +276,10 @@ new UserClass("admin", "base", [ Permissions::POOLS_ADMIN => true, Permissions::TIPS_ADMIN => true, Permissions::CRON_ADMIN => true, + Permissions::APPROVE_IMAGE => true, Permissions::APPROVE_COMMENT => true, + ]); new UserClass("hellbanned", "user", [