Merge pull request #3832 from stianst/KEYCLOAK-4370
KEYCLOAK-4370 Prevent LDAP provider from being migrated twice
This commit is contained in:
commit
1c7de24084
2 changed files with 3 additions and 2 deletions
|
@ -40,9 +40,11 @@ public class MigrateUserFedToComponent extends AbstractUserFedToComponent {
|
||||||
protected void generateStatementsImpl() throws CustomChangeException {
|
protected void generateStatementsImpl() throws CustomChangeException {
|
||||||
List<ProviderFactory> factories = kcSession.getKeycloakSessionFactory().getProviderFactories(UserStorageProvider.class);
|
List<ProviderFactory> factories = kcSession.getKeycloakSessionFactory().getProviderFactories(UserStorageProvider.class);
|
||||||
for (ProviderFactory factory : factories) {
|
for (ProviderFactory factory : factories) {
|
||||||
|
if (!factory.getId().equals(LDAPConstants.LDAP_PROVIDER)) {
|
||||||
convertFedProviderToComponent(factory.getId(), null);
|
convertFedProviderToComponent(factory.getId(), null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getTaskId() {
|
protected String getTaskId() {
|
||||||
|
|
|
@ -27,7 +27,6 @@ public class PortLdapUserFedToComponentModel extends AbstractUserFedToComponent
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void generateStatementsImpl() throws CustomChangeException {
|
protected void generateStatementsImpl() throws CustomChangeException {
|
||||||
String providerId = LDAPConstants.LDAP_PROVIDER;
|
|
||||||
convertFedProviderToComponent(LDAPConstants.LDAP_PROVIDER, "org.keycloak.storage.ldap.mappers.LDAPStorageMapper");
|
convertFedProviderToComponent(LDAPConstants.LDAP_PROVIDER, "org.keycloak.storage.ldap.mappers.LDAPStorageMapper");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue