log.debug("No roles ");
status = false; // No listed roles means no access at all
denyfromall = true;
+ break;
} else {
if(log.isDebugEnabled())
log.debug("Passing all access");
- return (true);
+ status = true;
}
} else if (principal == null) {
if (log.isDebugEnabled())
log.debug(" No user authenticated, cannot grant access");
- status = false;
- } else if(!denyfromall) {
-
+ } else {
for (int j = 0; j < roles.length; j++) {
if (hasRole(principal, roles[j]))
status = true;
}
}
- if (allRolesMode != AllRolesMode.STRICT_MODE && !status && principal != null) {
+ if (!denyfromall && allRolesMode != AllRolesMode.STRICT_MODE &&
+ !status && principal != null) {
if (log.isDebugEnabled()) {
log.debug("Checking for all roles mode: " + allRolesMode);
}