[keycloak-dev] UserStorageProvider.preRemove() hooks
tkyjovsk at redhat.com
Tue Jan 31 19:03:58 EST 2017
UserStorageProvider interace has 3 preRemove methods:
void preRemove(RealmModel realm)
void preRemove(RealmModel realm, GroupModel group)
void preRemove(RealmModel realm, RoleModel role)
These are triggered when a realm in which the provider is configured, or a group/role in that realm, are deleted.
For removal of individual entities they are triggered as expected but the problem might be when removing a realm: only the preRemove for realm is triggered - not for the groups/roles it contains.
Not sure if this is a bug. Maybe it's just a matter of documentation, to let people know they need to add logic for removing groups/roles to the "realm" preRemove method too.
More information about the keycloak-dev