Don't send activity to non-admins when assigning invisible tags (#25192)

This commit is contained in:
Vincent Petry 2016-06-20 22:06:34 +02:00 committed by Thomas Müller
parent ef5217d6e8
commit dcee528482
1 changed files with 4 additions and 0 deletions

View 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,