浏览代码

ZOOKEEPER-1432. Add javadoc and debug logging for checkACL() method in PrepRequestProcessor (Eugene Koontz via michim)


git-svn-id: https://svn.apache.org/repos/asf/zookeeper/trunk@1326029 13f79535-47bb-0310-9956-ffa450edef68
Michi Mutsuzaki 13 年之前
父节点
当前提交
1e63b65bfe
共有 2 个文件被更改,包括 16 次插入0 次删除
  1. 3 0
      CHANGES.txt
  2. 13 0
      src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java

+ 3 - 0
CHANGES.txt

@@ -273,6 +273,9 @@ IMPROVEMENTS:
 
   ZOOKEEPER-1435. cap space usage of default log4j rolling policy (phunt via henryr)
 
+  ZOOKEEPER-1432. Add javadoc and debug logging for checkACL() method in 
+  PrepRequestProcessor (Eugene Koontz via michim)
+
 Release 3.4.0 - 
 
 Non-backward compatible changes:

+ 13 - 0
src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java

@@ -254,11 +254,24 @@ public class PrepRequestProcessor extends Thread implements RequestProcessor {
         }
     }
 
+    /**
+     * Grant or deny authorization to an operation on a node as a function of:
+     *
+     * @param zks: not used.
+     * @param acl:  set of ACLs for the node
+     * @param perm: the permission that the client is requesting
+     * @param ids:  the credentials supplied by the client
+     */
     static void checkACL(ZooKeeperServer zks, List<ACL> acl, int perm,
             List<Id> ids) throws KeeperException.NoAuthException {
         if (skipACL) {
             return;
         }
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Permission requested: {} ", perm);
+            LOG.debug("ACLs for node: {}", acl);
+            LOG.debug("Client credentials: {}", ids);
+        }
         if (acl == null || acl.size() == 0) {
             return;
         }