diff --git a/contrib/report_image/main.php b/contrib/report_image/main.php index 71dd2de1..ae7b37b4 100644 --- a/contrib/report_image/main.php +++ b/contrib/report_image/main.php @@ -82,7 +82,7 @@ class ReportImage extends Extension { public function onDisplayingImage(DisplayingImageEvent $event) { global $config, $user, $page; - if($user->can('report_image')) { + if($user->can('create_image_report')) { $reps = $this->get_reporters($event->image); $this->theme->display_image_banner($event->image, $reps); } diff --git a/core/default_config.inc.php b/core/default_config.inc.php index 5f9e8ead..23faf3eb 100644 --- a/core/default_config.inc.php +++ b/core/default_config.inc.php @@ -45,7 +45,7 @@ define("EXTRA_USER_CLASSES", serialize(array( "moderator", # name for the new class "user", # class to base it on array( # parts of the base class to override - "lock_image" => True, + "edit_image_lock" => True, "view_ip" => True, "ban_ip" => True, "delete_image" => True, diff --git a/core/userclass.class.php b/core/userclass.class.php index c891c8f4..9f0a769e 100644 --- a/core/userclass.class.php +++ b/core/userclass.class.php @@ -36,41 +36,48 @@ $_user_class_base = new UserClass("base", null, array( "change_setting" => False, # modify web-level settings, eg the config table "override_config" => False, # modify sys-level settings, eg config.php "big_search" => False, # search for more than 3 tags at once (speed mode only) + + "manage_extension_list" => False, + "manage_alias_list" => False, + "mass_tag_edit" => False, + "view_ip" => False, # view IP addresses associated with things "ban_ip" => False, + "edit_user_password" => False, "edit_user_info" => False, # email address, etc "delete_user" => False, - "delete_image" => False, + "delete_comment" => False, + "replace_image" => False, - "manage_extension_list" => False, - "manage_alias_list" => False, "edit_image_tag" => False, "edit_image_source" => False, "edit_image_owner" => False, - "lock_image" => False, - "mass_tag_edit" => False, - "report_image" => False, + "edit_image_lock" => False, + "delete_image" => False, + + "create_image_report" => False, "view_image_report" => False, # deal with reported images + "protected" => False, # only admins can modify protected users (stops a moderator changing an admin's password) )); $_user_classes["anonymous"] = new UserClass("anonymous", $_user_class_base, array( "edit_image_tag" => "tag_edit_anon", "edit_image_source" => "source_edit_anon", - "report_image" => "report_image_anon", + "create_image_report" => "create_image_report_anon", )); $_user_classes["user"] = new UserClass("user", $_user_class_base, array( "big_search" => True, "edit_image_tag" => True, "edit_image_source" => True, - "report_image" => True, + "create_image_report" => True, )); $_user_classes["admin"] = new UserClass("admin", $_user_class_base, array( "change_setting" => True, "override_config" => True, "big_search" => True, - "lock_image" => True, + "edit_image_lock" => True, "view_ip" => True, "ban_ip" => True, "edit_user_password" => True, @@ -85,7 +92,7 @@ $_user_classes["admin"] = new UserClass("admin", $_user_class_base, array( "edit_image_source" => True, "edit_image_owner" => True, "mass_tag_edit" => True, - "report_image" => True, + "create_image_report" => True, "view_image_report" => True, "protected" => True, )); diff --git a/ext/tag_edit/main.php b/ext/tag_edit/main.php index 9907d5e1..7b539033 100644 --- a/ext/tag_edit/main.php +++ b/ext/tag_edit/main.php @@ -100,7 +100,7 @@ class TagEdit extends Extension { if($this->can_source($event->image)) { send_event(new SourceSetEvent($event->image, $_POST['tag_edit__source'])); } - if($user->can("lock_image")) { + if($user->can("edit_image_lock")) { $locked = isset($_POST['tag_edit__locked']) && $_POST['tag_edit__locked']=="on"; send_event(new LockSetEvent($event->image, $locked)); } @@ -108,28 +108,28 @@ class TagEdit extends Extension { public function onOwnerSet(OwnerSetEvent $event) { global $user; - if($user->can("edit_image_owner") && (!$event->image->is_locked() || $user->can("lock_image"))) { + if($user->can("edit_image_owner") && (!$event->image->is_locked() || $user->can("edit_image_lock"))) { $event->image->set_owner($event->owner); } } public function onTagSet(TagSetEvent $event) { global $user; - if($user->can("edit_image_tag") && (!$event->image->is_locked() || $user->can("lock_image"))) { + if($user->can("edit_image_tag") && (!$event->image->is_locked() || $user->can("edit_image_lock"))) { $event->image->set_tags($event->tags); } } public function onSourceSet(SourceSetEvent $event) { global $user; - if($user->can("edit_image_source") && (!$event->image->is_locked() || $user->can("lock_image"))) { + if($user->can("edit_image_source") && (!$event->image->is_locked() || $user->can("edit_image_lock"))) { $event->image->set_source($event->source); } } public function onLockSet(LockSetEvent $event) { global $user; - if($user->can("lock_image")) { + if($user->can("edit_image_lock")) { $event->image->set_locked($event->locked); } } diff --git a/ext/tag_edit/theme.php b/ext/tag_edit/theme.php index 679cead0..a82cc48d 100644 --- a/ext/tag_edit/theme.php +++ b/ext/tag_edit/theme.php @@ -99,7 +99,7 @@ class TagEditTheme extends Themelet {