|
|
@ -85,9 +85,14 @@ public class PermissionBasedScopeValidator extends OAuth2ScopeValidator {
|
|
|
|
int tenantId = OAuthExtUtils.getTenantId(authzUser.getTenantDomain());
|
|
|
|
int tenantId = OAuthExtUtils.getTenantId(authzUser.getTenantDomain());
|
|
|
|
UserRealm userRealm = OAuthExtensionsDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId);
|
|
|
|
UserRealm userRealm = OAuthExtensionsDataHolder.getInstance().getRealmService().getTenantUserRealm(tenantId);
|
|
|
|
if (userRealm != null && userRealm.getAuthorizationManager() != null) {
|
|
|
|
if (userRealm != null && userRealm.getAuthorizationManager() != null) {
|
|
|
|
status = userRealm.getAuthorizationManager()
|
|
|
|
if (userStore != null) {
|
|
|
|
.isUserAuthorized(userStore +"/"+ username, permission.getPath(),
|
|
|
|
status = userRealm.getAuthorizationManager()
|
|
|
|
PermissionMethod.UI_EXECUTE);
|
|
|
|
.isUserAuthorized(userStore + "/" + username, permission.getPath(),
|
|
|
|
|
|
|
|
PermissionMethod.UI_EXECUTE);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
status = userRealm.getAuthorizationManager()
|
|
|
|
|
|
|
|
.isUserAuthorized(username, permission.getPath(), PermissionMethod.UI_EXECUTE);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (PermissionManagementException e) {
|
|
|
|
} catch (PermissionManagementException e) {
|
|
|
|