Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add group events to UpdateGroups
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Aug 10, 2023
commit 34fa4138fb5c5f4e469d0b74b8773ce5d5f34609
7 changes: 7 additions & 0 deletions apps/user_ldap/lib/Jobs/UpdateGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ private function handleCreatedGroups(array $createdGroups): void {
foreach ($users as $user) {
$this->groupMembershipMapper->insert(GroupMembership::fromParams(['groupid' => $createdGroup,'userid' => $user]));
}
$groupObject = $this->groupManager->get($group);
if ($groupObject instanceof IGroup) {
$this->dispatcher->dispatchTyped(new GroupCreatedEvent($groupObject));
}
}
$this->logger->debug(
'bgJ "updateGroups" – FINISHED dealing with created Groups.',
Expand All @@ -207,6 +211,9 @@ private function handleRemovedGroups(array $removedGroups): void {
);

$this->groupMembershipMapper->deleteGroups($removedGroups);

//TODO find a way to dispatch GroupDeletedEvent

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