From a2c245158d64723d9af6edfd8ccdfcb7810ab144 Mon Sep 17 00:00:00 2001 From: Torsten Baldes Date: Wed, 13 Apr 2016 16:21:53 +0200 Subject: [PATCH] Check for page-delete permission to thrash a page Allow all users with page-delete permission to thrash a page in the page list actions. --- .../Process/ProcessPageList/ProcessPageListActions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wire/modules/Process/ProcessPageList/ProcessPageListActions.php b/wire/modules/Process/ProcessPageList/ProcessPageListActions.php index 8602dfd6..4cb34a24 100644 --- a/wire/modules/Process/ProcessPageList/ProcessPageListActions.php +++ b/wire/modules/Process/ProcessPageList/ProcessPageListActions.php @@ -162,7 +162,7 @@ public function ___getExtraActions(Page $page) { } } - if($this->superuser) { + if($user->hasPermission('page-delete', $page)) { $trashIcon = " "; if($page->trashable()) { $extras['trash'] = array( @@ -285,4 +285,4 @@ public function ___processAction(Page $page, $action) { return $result; } -} \ No newline at end of file +}