Added cron_admin permission
This commit is contained in:
parent
92a0afc15e
commit
d605e0e572
@ -80,4 +80,5 @@ abstract class Permissions
|
|||||||
public const NOTES_ADMIN = "notes_admin";
|
public const NOTES_ADMIN = "notes_admin";
|
||||||
public const POOLS_ADMIN = "pools_admin";
|
public const POOLS_ADMIN = "pools_admin";
|
||||||
public const TIPS_ADMIN = "tips_admin";
|
public const TIPS_ADMIN = "tips_admin";
|
||||||
|
public const CRON_ADMIN = "cron_admin";
|
||||||
}
|
}
|
||||||
|
@ -150,6 +150,7 @@ new UserClass("base", null, [
|
|||||||
Permissions::NOTES_ADMIN => false,
|
Permissions::NOTES_ADMIN => false,
|
||||||
Permissions::POOLS_ADMIN => false,
|
Permissions::POOLS_ADMIN => false,
|
||||||
Permissions::TIPS_ADMIN => false,
|
Permissions::TIPS_ADMIN => false,
|
||||||
|
Permissions::CRON_ADMIN => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
new UserClass("anonymous", "base", [
|
new UserClass("anonymous", "base", [
|
||||||
@ -226,6 +227,7 @@ new UserClass("admin", "base", [
|
|||||||
Permissions::NOTES_ADMIN => true,
|
Permissions::NOTES_ADMIN => true,
|
||||||
Permissions::POOLS_ADMIN => true,
|
Permissions::POOLS_ADMIN => true,
|
||||||
Permissions::TIPS_ADMIN => true,
|
Permissions::TIPS_ADMIN => true,
|
||||||
|
Permissions::CRON_ADMIN => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
new UserClass("hellbanned", "user", [
|
new UserClass("hellbanned", "user", [
|
||||||
|
@ -39,7 +39,7 @@ class CronUploader extends Extension
|
|||||||
$key = $event->get_arg(0);
|
$key = $event->get_arg(0);
|
||||||
if (!empty($key)) {
|
if (!empty($key)) {
|
||||||
$this->process_upload($key); // Start upload
|
$this->process_upload($key); // Start upload
|
||||||
} elseif ($user->is_admin()) {
|
} elseif ($user->can(Permissions::CRON_ADMIN)) {
|
||||||
$this->display_documentation();
|
$this->display_documentation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user