-
Notifications
You must be signed in to change notification settings - Fork 444
ACL Support #211
base: master
Are you sure you want to change the base?
ACL Support #211
Conversation
d75e8a0
to
94f50d5
Compare
94f50d5
to
c439489
Compare
Any update on when this change will be merged? |
Would love to see this merged cc @xiaochuanyu |
Will try to test out this PR this weekend. |
@xiaochuanyu any luck? |
@simplesteph sorry I didn't have time last weekend. Will try to find some time for this. |
@@ -309,6 +310,11 @@ public synchronized CuratorFramework getLocalConnection() throws IOException | |||
.connectionTimeoutMs(arguments.connectionTimeOutMs) | |||
.retryPolicy(new ExponentialBackoffRetry(1000, 3)); | |||
|
|||
String zkSuperUserPassword = configManager.getConfig().getString(StringConfigs.ZK_SUPER_USER_PASSWORD); | |||
if (zkSuperUserPassword != null && !zkSuperUserPassword.equals("")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: !Strings.isNullOrEmpty(zkSuperUserPassword)
/** | ||
* Contains a list of all those properties that we don't want returned in the 'get-state' method. | ||
*/ | ||
private static final List<StringConfigs> EXCLUSIONS = Arrays.asList( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style:
private static final Set<StringConfigs> EXCLUSIONS = Sets.immutableEnumSet(
StringConfigs.ZK_SUPER_USER_PASSWORD
);
@@ -156,6 +165,18 @@ private void recursivelyDelete(String path) throws Exception | |||
|
|||
try | |||
{ | |||
List<ACL> acls = new ArrayList<ACL>(); | |||
boolean processAcls = (aclsEnabled && (aclsJsonArray != null && !aclsJsonArray.equals(""))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style: !Strings.isNullOrEmpty(aclsJsonArray)
|
||
for (ACL acl : acls) { | ||
aclsAsString.append(encodeAclToString(acl)); | ||
aclsAsString.append("<br/>"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should have html tags in return values of the REST API.
Maybe JSON list of strings?
|
||
$("#path").text(node.data.key); | ||
$("#stat").text(data.stat); | ||
$("#data-bytes").text(data.bytes); | ||
$("#data-str").text(data.str); | ||
$("#node-acl").html(data.acls) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming we want data.acl
to be json list of strings.
This part will need to be changed to parse it into html.
Closing and re-opening to trigger Travis CI. |
Added support for ACLs. ACL support is turned off by default in configuration. Also made the tracking fields possible to be turned off via configuration.