KEYCLOAK-5841 Fix NPE in deletePermissionSetup in UserPermissions
Previously a call to `UserPermissions#deletePermissionSetup` always resulted in a NPE if the usersResource was null. We now only try to delete the resourceStore information if the given usersResource is not null.
This commit is contained in:
parent
0dfbe01c73
commit
a5b73a365d
1 changed files with 1 additions and 1 deletions
|
@ -195,7 +195,7 @@ class UserPermissions implements UserPermissionEvaluator, UserPermissionManageme
|
|||
|
||||
}
|
||||
Resource usersResource = authz.getStoreFactory().getResourceStore().findByName(USERS_RESOURCE, server.getId());
|
||||
if (usersResource == null) {
|
||||
if (usersResource != null) {
|
||||
authz.getStoreFactory().getResourceStore().delete(usersResource.getId());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue