diff --git a/core/permissions.php b/core/permissions.php index bd60b0c0..e546236b 100644 --- a/core/permissions.php +++ b/core/permissions.php @@ -80,4 +80,5 @@ abstract class Permissions public const NOTES_ADMIN = "notes_admin"; public const POOLS_ADMIN = "pools_admin"; public const TIPS_ADMIN = "tips_admin"; + public const CRON_ADMIN = "cron_admin"; } diff --git a/core/userclass.php b/core/userclass.php index 5c60c9a0..2207fa63 100644 --- a/core/userclass.php +++ b/core/userclass.php @@ -150,6 +150,7 @@ new UserClass("base", null, [ Permissions::NOTES_ADMIN => false, Permissions::POOLS_ADMIN => false, Permissions::TIPS_ADMIN => false, + Permissions::CRON_ADMIN => false, ]); new UserClass("anonymous", "base", [ @@ -226,6 +227,7 @@ new UserClass("admin", "base", [ Permissions::NOTES_ADMIN => true, Permissions::POOLS_ADMIN => true, Permissions::TIPS_ADMIN => true, + Permissions::CRON_ADMIN => true, ]); new UserClass("hellbanned", "user", [ diff --git a/ext/cron_uploader/main.php b/ext/cron_uploader/main.php index 98999d29..38ff3e8c 100644 --- a/ext/cron_uploader/main.php +++ b/ext/cron_uploader/main.php @@ -39,7 +39,7 @@ class CronUploader extends Extension $key = $event->get_arg(0); if (!empty($key)) { $this->process_upload($key); // Start upload - } elseif ($user->is_admin()) { + } elseif ($user->can(Permissions::CRON_ADMIN)) { $this->display_documentation(); } }