mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-02 17:14:53 +02:00
Register repair step for group migrations
Signed-off-by: Giuliano Mele <giuliano.mele@verdigado.com>
This commit is contained in:
parent
e6effba008
commit
9deba64f14
|
@ -46,4 +46,9 @@ While theoretically any other authentication provider implementing either one of
|
|||
<admin>OCA\User_SAML\Settings\Admin</admin>
|
||||
<admin-section>OCA\User_SAML\Settings\Section</admin-section>
|
||||
</settings>
|
||||
<repair-steps>
|
||||
<post-migration>
|
||||
<step>OCA\User_SAML\Migration\RememberLocalGroupsForPotentialMigrations</step>
|
||||
</post-migration>
|
||||
</repair-steps>
|
||||
</info>
|
||||
|
|
|
@ -173,6 +173,9 @@ class GroupManager
|
|||
null
|
||||
);
|
||||
$strictBackendCheck = null === $migrationWhiteList;
|
||||
if ($migrationWhiteList !== null) {
|
||||
$migrationWhiteList = \json_decode($migrationWhiteList, true);
|
||||
}
|
||||
if(!$strictBackendCheck && in_array($gid, $migrationWhiteList['groups'], true)) {
|
||||
$group = $this->groupManager->get($gid);
|
||||
if($group === null) {
|
||||
|
|
|
@ -140,7 +140,7 @@ class MigrateGroups extends QueuedJob {
|
|||
$reflected = new \ReflectionClass($group);
|
||||
$backendsProperty = $reflected->getProperty('backends');
|
||||
$backendsProperty->setAccessible(true);
|
||||
$backends = $backendsProperty->getValue();
|
||||
$backends = $backendsProperty->getValue($group);
|
||||
foreach ($backends as $backend) {
|
||||
if($backend instanceof Database) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue