From 1bd9238b1756a2e07d7385478dfcbe4801ee4830 Mon Sep 17 00:00:00 2001 From: matthew Date: Thu, 27 Jun 2019 08:11:19 -0500 Subject: [PATCH] Additional trash stuff --- core/userclass.php | 11 +++++++++++ ext/trash/main.php | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/core/userclass.php b/core/userclass.php index de781aa2..fdb0ce28 100644 --- a/core/userclass.php +++ b/core/userclass.php @@ -128,6 +128,11 @@ new UserClass("base", null, [ "view_hellbanned" => false, "protected" => false, # only admins can modify protected users (stops a moderator changing an admin's password) + + "edit_image_rating" => false, + "bulk_edit_image_rating" => false, + + "view_trash" => false, ]); new UserClass("anonymous", "base", [ @@ -140,6 +145,8 @@ new UserClass("user", "base", [ "edit_image_tag" => true, "edit_image_source" => true, "create_image_report" => true, + "edit_image_rating" => true, + ]); new UserClass("admin", "base", [ @@ -184,6 +191,10 @@ new UserClass("admin", "base", [ "view_sysinfo" => true, "view_hellbanned" => true, "protected" => true, + "edit_image_rating" => true, + "bulk_edit_image_rating" => true, + "view_trash" => true, + ]); new UserClass("hellbanned", "user", [ diff --git a/ext/trash/main.php b/ext/trash/main.php index dc32000f..bda019b7 100644 --- a/ext/trash/main.php +++ b/ext/trash/main.php @@ -59,7 +59,7 @@ class Trash extends Extension { global $user, $page; - if(!$user->can("view_trash")) { + if($event->image->trash===true && !$user->can("view_trash")) { $page->set_mode(PageMode::REDIRECT); $page->set_redirect(make_link("post/list")); }