user needs perm /and/ the image needs to be unlocked

This commit is contained in:
Shish 2012-03-13 04:48:18 +00:00
parent 4b59c79fed
commit 16b232c857

View File

@ -108,21 +108,21 @@ class TagEdit extends Extension {
public function onOwnerSet(OwnerSetEvent $event) {
global $user;
if($user->can("edit_image_owner") || !$event->image->is_locked()) {
if($user->can("edit_image_owner") && (!$event->image->is_locked() || $user->can("lock_image"))) {
$event->image->set_owner($event->owner);
}
}
public function onTagSet(TagSetEvent $event) {
global $user;
if($user->can("edit_image_tag") || !$event->image->is_locked()) {
if($user->can("edit_image_tag") && (!$event->image->is_locked() || $user->can("lock_image"))) {
$event->image->set_tags($event->tags);
}
}
public function onSourceSet(SourceSetEvent $event) {
global $user;
if($user->can("edit_image_source") || !$event->image->is_locked()) {
if($user->can("edit_image_source") && (!$event->image->is_locked() || $user->can("lock_image"))) {
$event->image->set_source($event->source);
}
}