use user classes
This commit is contained in:
parent
b4140fd77b
commit
907f958f42
@ -123,9 +123,9 @@ class TagEditCloud extends Extension {
|
|||||||
private function can_tag($image) {
|
private function can_tag($image) {
|
||||||
global $config, $user;
|
global $config, $user;
|
||||||
return (
|
return (
|
||||||
($config->get_bool("tag_edit_anon") || !$user->is_anonymous()) &&
|
$user->can("edit_image_tag") &&
|
||||||
($user->is_admin() || !$image->is_locked())
|
(!$image->is_locked() || $user->can("edit_image_lock"))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ class Tag_History extends Extension {
|
|||||||
|
|
||||||
if($event->page_matches("tag_history/revert")) {
|
if($event->page_matches("tag_history/revert")) {
|
||||||
// this is a request to revert to a previous version of the tags
|
// this is a request to revert to a previous version of the tags
|
||||||
if($config->get_bool("tag_edit_anon") || !$user->is_anonymous()) {
|
if($user->can("edit_image_tag")) {
|
||||||
if(isset($_POST['revert'])) {
|
if(isset($_POST['revert'])) {
|
||||||
$this->process_revert_request($_POST['revert']);
|
$this->process_revert_request($_POST['revert']);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user