Do not try to delete from related federated user tables when deleting a service account linked user.

This commit is contained in:
Patrick Jennings 2022-06-01 13:31:09 -04:00 committed by Hynek Mlnařík
parent 95528e77bb
commit d048bf22fb

View file

@ -282,7 +282,10 @@ public class UserStorageManager extends AbstractStorageManager<UserStorageProvid
@Override
public boolean removeUser(RealmModel realm, UserModel user) {
if (getFederatedStorage() != null) getFederatedStorage().preRemove(realm, user);
if (getFederatedStorage() != null && user.getServiceAccountClientLink() == null) {
getFederatedStorage().preRemove(realm, user);
}
StorageId storageId = new StorageId(user.getId());
if (storageId.getProviderId() == null) {