mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
added userstore null check for permission scope validator
This commit is contained in:
parent
9f98f538de
commit
1c0807a513
@ -85,9 +85,14 @@ public class PermissionBasedScopeValidator extends OAuth2ScopeValidator {
|
||||
int tenantId = OAuthExtUtils.getTenantId(authzUser.getTenantDomain());
|
||||
UserRealm userRealm = OAuthExtensionsDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId);
|
||||
if (userRealm != null && userRealm.getAuthorizationManager() != null) {
|
||||
if (userStore != null) {
|
||||
status = userRealm.getAuthorizationManager()
|
||||
.isUserAuthorized(userStore +"/"+ username, permission.getPath(),
|
||||
.isUserAuthorized(userStore + "/" + username, permission.getPath(),
|
||||
PermissionMethod.UI_EXECUTE);
|
||||
} else {
|
||||
status = userRealm.getAuthorizationManager()
|
||||
.isUserAuthorized(username, permission.getPath(), PermissionMethod.UI_EXECUTE);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (PermissionManagementException e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user