From dcee5284828bea459e69448ac5f3363a584cab73 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 20 Jun 2016 22:06:34 +0200 Subject: [PATCH] Don't send activity to non-admins when assigning invisible tags (#25192) --- apps/systemtags/lib/Activity/Listener.php | 4 ++++ 1 file changed, 4 insertions(+) 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, -- 2.39.5