boolean outcome = false;
String token = placemanager.getCurrentPlaceRequest().getNameToken();
if (securityFramework.hasContext(token)) {
SecurityContext securityContext = securityFramework.getSecurityContext(token);
final AuthorisationDecision readPrivilege = securityContext.getReadPriviledge();
// bootstrap operations
boolean bootstrapRequirementsSatisfied = true;
for (String op : accessControlMetaData.getOperations(token)) {
int idx = op.indexOf("#");
AuthorisationDecision opPrivilege = securityContext.getOperationPriviledge(
op.substring(0, idx),
op.substring(idx + 1, op.length())
);
if (!opPrivilege.isGranted()) {
bootstrapRequirementsSatisfied = false;
break;
}
}
outcome = readPrivilege.isGranted() && bootstrapRequirementsSatisfied;