Don't send activity to non-admins when assigning invisible tags (#25192)
This commit is contained in:
parent
ef5217d6e8
commit
dcee528482
|
@ -188,6 +188,10 @@ class Listener {
|
||||||
$activity->setAffectedUser($user);
|
$activity->setAffectedUser($user);
|
||||||
|
|
||||||
foreach ($tags as $tag) {
|
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) {
|
if ($event->getEvent() === MapperEvent::EVENT_ASSIGN) {
|
||||||
$activity->setSubject(Extension::ASSIGN_TAG, [
|
$activity->setSubject(Extension::ASSIGN_TAG, [
|
||||||
$actor,
|
$actor,
|
||||||
|
|
Loading…
Reference in New Issue