Fixed the configuration of acl_file path

This commit is contained in:
andrea
2015-05-19 23:15:44 +02:00
parent 8b8058dc47
commit 302f3a96ce
5 changed files with 12 additions and 4 deletions
@@ -206,9 +206,11 @@ public class SimpleMessaging implements IMessaging, EventHandler<ValueEvent> {
String aclFilePath = props.getProperty(ACL_FILE_PROPERTY_NAME, "");
IAuthorizator authorizator;
if (aclFilePath != null && !aclFilePath.isEmpty()) {
authorizator = new ACLAuthorizator(aclFilePath);
authorizator = new ACLAuthorizator(configPath, aclFilePath);
LOG.info("Using acl file defined at path {}", aclFilePath);
} else {
authorizator = new PermitAllAuthorizator();
LOG.info("Starting without ACL definition");
}
boolean allowAnonymous = Boolean.parseBoolean(props.getProperty(ALLOW_ANONYMOUS_PROPERTY_NAME, "true"));
@@ -35,8 +35,8 @@ public class ACLAuthorizator implements IAuthorizator {
List<Authorization> m_authorisations = Collections.emptyList();
public ACLAuthorizator(String aclFilePath) {
File aclFile = new File(aclFilePath);
public ACLAuthorizator(String parent, String filePath) {
File aclFile = new File(parent, filePath);
try {
m_authorisations = ACLFileParser.parse(aclFile);
} catch (ParseException pex) {