diff --git a/plugins/acl/static-role-based/resources/META-INF/cloudstack/acl-static-role-based/spring-acl-static-role-based-context.xml b/plugins/acl/static-role-based/resources/META-INF/cloudstack/acl-static-role-based/spring-acl-static-role-based-context.xml index f13acc190b6..0b222837f4c 100644 --- a/plugins/acl/static-role-based/resources/META-INF/cloudstack/acl-static-role-based/spring-acl-static-role-based-context.xml +++ b/plugins/acl/static-role-based/resources/META-INF/cloudstack/acl-static-role-based/spring-acl-static-role-based-context.xml @@ -29,6 +29,11 @@ + + + commands.properties + + diff --git a/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java b/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java index 1316a92ccb1..4383b4573f9 100644 --- a/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java +++ b/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java @@ -45,6 +45,7 @@ public class StaticRoleBasedAPIAccessChecker extends AdapterBase implements APIC protected static final Logger s_logger = Logger.getLogger(StaticRoleBasedAPIAccessChecker.class); + Set commandPropertyFiles = new HashSet(); Set commandsPropertiesOverrides = new HashSet(); Map> commandsPropertiesRoleBasedApisMap = new HashMap>(); Map> annotationRoleBasedApisMap = new HashMap>(); @@ -84,7 +85,9 @@ public class StaticRoleBasedAPIAccessChecker extends AdapterBase implements APIC public boolean configure(String name, Map params) throws ConfigurationException { super.configure(name, params); - processMapping(PropertiesUtil.processConfigFile(new String[] {"commands.properties"})); + for (String commandPropertyFile : commandPropertyFiles) { + processMapping(PropertiesUtil.processConfigFile(new String[] { commandPropertyFile })); + } return true; } @@ -129,4 +132,12 @@ public class StaticRoleBasedAPIAccessChecker extends AdapterBase implements APIC this._services = services; } + public Set getCommandPropertyFiles() { + return commandPropertyFiles; + } + + public void setCommandPropertyFiles(Set commandPropertyFiles) { + this.commandPropertyFiles = commandPropertyFiles; + } + }