Fixed the configuration of acl_file path
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user