From: Vincent Petry Date: Mon, 20 Jun 2016 20:06:34 +0000 (+0200) Subject: Don't send activity to non-admins when assigning invisible tags (#25192) X-Git-Tag: v9.1.0RC1~51 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dcee5284828bea459e69448ac5f3363a584cab73;p=nextcloud-server.git Don't send activity to non-admins when assigning invisible tags (#25192) --- diff --git a/apps/systemtags/lib/Activity/Listener.php b/apps/systemtags/lib/Activity/Listener.php index 9b6597119c6..435109053bd 100644 --- a/apps/systemtags/lib/Activity/Listener.php +++ b/apps/systemtags/lib/Activity/Listener.php @@ -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,