use of org.jboss.security.acl.config.ACLProviderEntry in project wildfly by wildfly.
the class SecurityDomainAdd method processACL.
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().isEmpty()) {
aclInfo.addJBossModuleName(moduleName.asString());
} else {
aclInfo.addJBossModuleName(DEFAULT_MODULE);
}
}
applicationPolicy.setAclInfo(aclInfo);
return true;
}
Aggregations