Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ThaminduR committed Oct 26, 2023
1 parent 6ce5ec0 commit 62307b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ private static OMElement getResourceAccessControlConfigs() {
} catch (IOException e) {
String message = "Error while reading Resource Access control configuration at: " + path.getFileName();
log.error(message);
} catch (XMLStreamException e
) {
} catch (XMLStreamException e) {
String message = "Error while parsing Resource Access control configuration at: " + path.getFileName();
log.error(message);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,8 @@ public AuthorizationResult handleAuthorization(AuthorizationContext authorizatio
if (isScopeValidationRequired(authorizationContext, validateScope)) {
validateScopes(authorizationContext, authorizationResult, allowedScopes);
}
else if (CarbonConstants.ENABLE_LEGACY_AUTHZ_RUNTIME) {
if (StringUtils.isNotBlank(permissionString) || authorizationContext.getRequiredScopes().size() == 0) {
validatePermissions(authorizationResult, user, permissionString, tenantUserRealm);
}
} else {
// TODO: Use OAuth2 scope validator, once merged.
if (StringUtils.isNotBlank(permissionString) || authorizationContext.getRequiredScopes().size() == 0) {
validatePermissions(authorizationResult, user, permissionString, tenantUserRealm);
// authorizationResult.setAuthorizationStatus(AuthorizationStatus.GRANT);

}
} catch (UserStoreException e) {
String errorMessage = "Error occurred while trying to authorize, " + e.getMessage();
Expand Down

0 comments on commit 62307b0

Please sign in to comment.