You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by mi...@apache.org on 2012/04/14 02:32:19 UTC

svn commit: r1326029 - in /zookeeper/trunk: CHANGES.txt src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java

Author: michim
Date: Sat Apr 14 00:32:19 2012
New Revision: 1326029

URL: http://svn.apache.org/viewvc?rev=1326029&view=rev
Log:
ZOOKEEPER-1432. Add javadoc and debug logging for checkACL() method in PrepRequestProcessor (Eugene Koontz via michim)


Modified:
    zookeeper/trunk/CHANGES.txt
    zookeeper/trunk/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java

Modified: zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/trunk/CHANGES.txt?rev=1326029&r1=1326028&r2=1326029&view=diff
==============================================================================
--- zookeeper/trunk/CHANGES.txt (original)
+++ zookeeper/trunk/CHANGES.txt Sat Apr 14 00:32:19 2012
@@ -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:

Modified: zookeeper/trunk/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java
URL: http://svn.apache.org/viewvc/zookeeper/trunk/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java?rev=1326029&r1=1326028&r2=1326029&view=diff
==============================================================================
--- zookeeper/trunk/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java (original)
+++ zookeeper/trunk/src/java/main/org/apache/zookeeper/server/PrepRequestProcessor.java Sat Apr 14 00:32:19 2012
@@ -254,11 +254,24 @@ public class PrepRequestProcessor extend
         }
     }
 
+    /**
+     * 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;
         }