Skip to content

Commit c2a04e3

Browse files
author
gaojiabao1991
committed
Fix Bug: Add authInfo before listNodeEntries
Fix Bug: Add authInfo before listNodeEntries,otherwise the authInfo in file "config.cfg" will not take effect.
1 parent 656c223 commit c2a04e3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/com/deem/zkui/utils/ZooKeeperUtil.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,13 @@ private void createIfDoesntExist(String path, byte[] data, boolean force, ZooKee
249249
}
250250

251251
public ZKNode listNodeEntries(ZooKeeper zk, String path, String authRole) throws KeeperException, InterruptedException {
252+
//Add auth info
253+
for (ACL acl : defaultAcl) {
254+
String scheme=acl.getId().getScheme();
255+
String auth=acl.getId().getId();
256+
zk.addAuthInfo(scheme,auth.getBytes());
257+
}
258+
252259
List<String> folders = new ArrayList<>();
253260
List<LeafBean> leaves = new ArrayList<>();
254261

0 commit comments

Comments
 (0)