]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't send activity to non-admins when assigning invisible tags (#25192)
authorVincent Petry <pvince81@owncloud.com>
Mon, 20 Jun 2016 20:06:34 +0000 (22:06 +0200)
committerThomas Müller <DeepDiver1975@users.noreply.github.com>
Mon, 20 Jun 2016 20:06:34 +0000 (22:06 +0200)
apps/systemtags/lib/Activity/Listener.php

index 9b6597119c6c79b4fb7d1f791cb0055949c09203..435109053bd21b871b98a4b233da2dda2537f9a0 100644 (file)
@@ -188,6 +188,10 @@ class Listener {
                        $activity->setAffectedUser($user);
 
                        foreach ($tags as $tag) {
+                               // don't publish activity for non-admins if tag is invisible
+                               if (!$tag->isUserVisible() && !$this->groupManager->isAdmin($user)) {
+                                       continue;
+                               }
                                if ($event->getEvent() === MapperEvent::EVENT_ASSIGN) {
                                        $activity->setSubject(Extension::ASSIGN_TAG, [
                                                $actor,