Skip to content

Commit

Permalink
Fix Bug: Add authInfo before listNodeEntries
Browse files Browse the repository at this point in the history
Fix Bug: Add authInfo before listNodeEntries,otherwise the authInfo in file "config.cfg" will not take effect.
  • Loading branch information
gaojiabao1991 committed May 16, 2016
1 parent 656c223 commit c2a04e3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/com/deem/zkui/utils/ZooKeeperUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ private void createIfDoesntExist(String path, byte[] data, boolean force, ZooKee
}

public ZKNode listNodeEntries(ZooKeeper zk, String path, String authRole) throws KeeperException, InterruptedException {
//Add auth info
for (ACL acl : defaultAcl) {
String scheme=acl.getId().getScheme();
String auth=acl.getId().getId();
zk.addAuthInfo(scheme,auth.getBytes());
}

List<String> folders = new ArrayList<>();
List<LeafBean> leaves = new ArrayList<>();

Expand Down

0 comments on commit c2a04e3

Please sign in to comment.