private boolean processAuthorization(String securityDomain, ModelNode node, ApplicationPolicy applicationPolicy) {
node = peek(node, AUTHORIZATION, CLASSIC);
if (node == null)
return false;
AuthorizationInfo authzInfo = new AuthorizationInfo(securityDomain);
List<ModelNode> modules = node.get(POLICY_MODULES).asList();
for (ModelNode module : modules) {
String codeName = this.extractCode(module, ModulesMap.AUTHORIZATION_MAP);
ControlFlag controlFlag = ControlFlag.valueOf(module.require(FLAG).asString());
Map<String, Object> options = extractOptions(module);
AuthorizationModuleEntry authzModuleEntry = new AuthorizationModuleEntry(codeName, options);
authzModuleEntry.setControlFlag(controlFlag);
authzInfo.add(authzModuleEntry);
String moduleName = module.get(MODULE).asString();
if(module.hasDefined(MODULE) && moduleName != null && moduleName.length() > 0 ) {
authzInfo.setJBossModuleName(moduleName);
}
}
applicationPolicy.setAuthorizationInfo(authzInfo);
return true;