s/is_admin/can(perform_bulk_actions)/
This commit is contained in:
parent
3dce134fe9
commit
c5aba18470
@ -133,6 +133,7 @@ new UserClass("base", null, [
|
|||||||
"bulk_edit_image_rating" => false,
|
"bulk_edit_image_rating" => false,
|
||||||
|
|
||||||
"view_trash" => false,
|
"view_trash" => false,
|
||||||
|
"perform_bulk_actions" => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
new UserClass("anonymous", "base", [
|
new UserClass("anonymous", "base", [
|
||||||
@ -194,7 +195,7 @@ new UserClass("admin", "base", [
|
|||||||
"edit_image_rating" => true,
|
"edit_image_rating" => true,
|
||||||
"bulk_edit_image_rating" => true,
|
"bulk_edit_image_rating" => true,
|
||||||
"view_trash" => true,
|
"view_trash" => true,
|
||||||
|
"perform_bulk_actions" => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
new UserClass("hellbanned", "user", [
|
new UserClass("hellbanned", "user", [
|
||||||
|
@ -147,7 +147,7 @@ class BulkActions extends Extension
|
|||||||
public function onPageRequest(PageRequestEvent $event)
|
public function onPageRequest(PageRequestEvent $event)
|
||||||
{
|
{
|
||||||
global $page, $user;
|
global $page, $user;
|
||||||
if ($event->page_matches("bulk_action") && $user->is_admin()) {
|
if ($event->page_matches("bulk_action") && $user->can("perform_bulk_actions")) {
|
||||||
if (!isset($_POST['bulk_action'])) {
|
if (!isset($_POST['bulk_action'])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user