KEYCLOAK-19536 Removal of client creates new instance of provider for each client role
This commit is contained in:
parent
a4f83c569d
commit
dacf28af84
3 changed files with 4 additions and 3 deletions
|
@ -26,6 +26,7 @@ import org.keycloak.models.RealmProviderFactory;
|
|||
import javax.persistence.EntityManager;
|
||||
import org.keycloak.models.ClientModel;
|
||||
import org.keycloak.models.RealmModel;
|
||||
import org.keycloak.models.RealmProvider;
|
||||
import org.keycloak.models.RoleContainerModel;
|
||||
import org.keycloak.models.RoleContainerModel.RoleRemovedEvent;
|
||||
import org.keycloak.models.RoleModel;
|
||||
|
@ -83,7 +84,7 @@ public class JpaRealmProviderFactory implements RealmProviderFactory, ProviderEv
|
|||
} else {
|
||||
return;
|
||||
}
|
||||
create(e.getKeycloakSession()).preRemove(realm, role);
|
||||
((JpaRealmProvider) e.getKeycloakSession().getProvider(RealmProvider.class)).preRemove(realm, role);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public class MapClientProviderFactory extends AbstractMapProviderFactory<ClientP
|
|||
} else {
|
||||
return;
|
||||
}
|
||||
create(e.getKeycloakSession()).preRemove(realm, role);
|
||||
((MapClientProvider) e.getKeycloakSession().getProvider(ClientProvider.class)).preRemove(realm, role);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ public class MapGroupProviderFactory extends AbstractMapProviderFactory<GroupPro
|
|||
} else {
|
||||
return;
|
||||
}
|
||||
create(e.getKeycloakSession()).preRemove(realm, role);
|
||||
((MapGroupProvider) e.getKeycloakSession().getProvider(GroupProvider.class)).preRemove(realm, role);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue