Skip to content

Commit

Permalink
Only remove user groups from SAML backend
Browse files Browse the repository at this point in the history
  • Loading branch information
melegiul committed Jul 27, 2021
1 parent 0912c7c commit 9744c96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/GroupManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function removeGroups(IUser $user, array $groupIds) {

public function removeGroup(IUser $user, string $gid) {
$group = $this->groupManager->get($gid);
if($group === null) {
if($group === null || !$this->hasSamlBackend($group)) {
return;
}
$group->removeUser($user);
Expand Down

0 comments on commit 9744c96

Please sign in to comment.