Skip to content

Commit

Permalink
migrate only groups whose members stem from user_saml
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Schiwon <[email protected]>
  • Loading branch information
blizzz committed Nov 23, 2022
1 parent 6b1f472 commit 50509bc
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/Jobs/MigrateGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,19 @@ protected function getGroupsToMigrate(array $samlGroups, array $pool): array {
if ($group === null) {
return false;
}

$backendNames = $group->getBackendNames();
if (in_array('Database', $backendNames, true)) {
return true;
if (!in_array('Database', $backendNames, true)) {
return false;
}

foreach ($group->getUsers() as $user) {
if ($user->getBackendClassName() !== 'user_saml') {
return false;
}
}
return false;

return true;
});
}

Expand Down

0 comments on commit 50509bc

Please sign in to comment.