Browse Source

Removed GroupCreatedEvent/GroupDeletedEvent from UpdateGroupsService

This should be handled when mapping groups, not when registering their
 members. An empty group may still exist.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
tags/v28.0.0beta1
Côme Chilliet 10 months ago
parent
commit
7732de75ee
No account linked to committer's email address
1 changed files with 0 additions and 6 deletions
  1. 0
    6
      apps/user_ldap/lib/Service/UpdateGroupsService.php

+ 0
- 6
apps/user_ldap/lib/Service/UpdateGroupsService.php View File

@@ -38,7 +38,6 @@ use OCA\User_LDAP\Db\GroupMembershipMapper;
use OCA\User_LDAP\Group_Proxy;
use OCP\DB\Exception;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Group\Events\GroupCreatedEvent;
use OCP\Group\Events\UserAddedEvent;
use OCP\Group\Events\UserRemovedEvent;
use OCP\IGroup;
@@ -151,9 +150,6 @@ class UpdateGroupsService {

$users = $this->groupBackend->usersInGroup($createdGroup);
$groupObject = $this->groupManager->get($createdGroup);
if ($groupObject instanceof IGroup) {
$this->dispatcher->dispatchTyped(new GroupCreatedEvent($groupObject));
}
foreach ($users as $user) {
$this->groupMembershipMapper->insert(GroupMembership::fromParams(['groupid' => $createdGroup,'userid' => $user]));
if ($groupObject instanceof IGroup) {
@@ -188,8 +184,6 @@ class UpdateGroupsService {
}
}

//TODO find a way to dispatch GroupDeletedEvent

$this->logger->info(
'service "updateGroups" – groups {removedGroups} were removed.',
[

Loading…
Cancel
Save