private boolean processACL(OperationContext context, String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy)
throws OperationFailedException {
node = peek(node, ACL, CLASSIC, ACL_MODULE);
if (node == null) { return false; }
ACLInfo aclInfo = new ACLInfo(securityDomain);
for (Property moduleProperty : node.asPropertyList()) {
ModelNode module = moduleProperty.getValue();
String codeName = LoginModuleResourceDefinition.CODE.resolveModelAttribute(context, module).asString();
String flag = LoginModuleResourceDefinition.FLAG.resolveModelAttribute(context, module).asString();
ControlFlag controlFlag = ControlFlag.valueOf(flag);
Map<String, Object> options = extractOptions(context, module);
ACLProviderEntry entry = new ACLProviderEntry(codeName, options);
entry.setControlFlag(controlFlag);
aclInfo.add(entry);
ModelNode moduleName = LoginModuleResourceDefinition.MODULE.resolveModelAttribute(context, module);
if (moduleName.isDefined() && moduleName.asString().length() > 0) {
aclInfo.setJBossModuleName(moduleName.asString());
}
}
applicationPolicy.setAclInfo(aclInfo);
return true;