// ACL capabilities
if (ri.getAclCapabilities() == null) {
addResult(createResult(WARNING, "ACL capabilities are not set!"));
} else {
AclCapabilities aclCap = ri.getAclCapabilities();
// supported permissions
success = createResult(OK, "Supported permissions: " + aclCap.getSupportedPermissions());
failure = createResult(WARNING, "Supported permissions are not set!");
addResult(assertNotNull(aclCap.getSupportedPermissions(), success, failure));
// ACL propagation
success = createResult(OK, "ACL propagation: " + aclCap.getAclPropagation());
failure = createResult(WARNING, "ACL propagation is not set!");
addResult(assertNotNull(aclCap.getAclPropagation(), success, failure));
// permissions
success = createResult(OK, "Permissions: "
+ (aclCap.getPermissions() == null ? "?" : aclCap.getPermissions().size()));
failure = createResult(FAILURE, "Permissions are not set!");
addResult(assertNotNull(aclCap.getPermissions(), success, failure));
if (aclCap.getPermissions() != null) {
int i = 0;
for (PermissionDefinition permDef : aclCap.getPermissions()) {
failure = createResult(FAILURE, "Permission #" + i + " is not set!");
addResult(assertNotNull(permDef, null, failure));
if (permDef != null) {
failure = createResult(FAILURE, "Id of permission #" + i + " is not set!");
addResult(assertStringNotEmpty(permDef.getId(), null, failure));
}
i++;
}
}
// permission mapping
success = createResult(OK, "Permission mapping: "
+ (aclCap.getPermissionMapping() == null ? "?" : aclCap.getPermissionMapping().size()));
failure = createResult(WARNING, "Permission mapping is not set!");
addResult(assertNotNull(aclCap.getPermissionMapping(), success, failure));
}
}