Additional trash stuff
This commit is contained in:
parent
32d37254f7
commit
1bd9238b17
2 changed files with 12 additions and 1 deletions
|
@ -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", [
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
|
|
Reference in a new issue