Author: btellier
Date: Fri Jun 26 16:22:01 2015
New Revision: 1687801

URL: http://svn.apache.org/r1687801
Log:
MPT-14 ACL integration tests : ACL management

Added:
    
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightA.test
    
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightA.test
Modified:
    
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java

Modified: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java?rev=1687801&r1=1687800&r2=1687801&view=diff
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
 (original)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/ACLIntegration.java
 Fri Jun 26 16:22:01 2015
@@ -72,4 +72,16 @@ public class ACLIntegration extends Base
         scriptTest("aclIntegration/ACLIntegrationWithoutRightL", Locale.US);
     }
 
+    @Test
+    public void rightAShouldBeSufficientToManageACLUS() throws Exception {
+        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new 
SimpleMailboxACL.Rfc4314Rights("a"));
+        scriptTest("aclIntegration/ACLIntegrationRightA", Locale.US);
+    }
+
+    @Test
+    public void rightAShouldBeNeededToManageACLUS() throws Exception {
+        grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new 
SimpleMailboxACL.Rfc4314Rights("rswipkxtecdl"));
+        scriptTest("aclIntegration/ACLIntegrationWithoutRightA", Locale.US);
+    }
+
 }

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightA.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightA.test?rev=1687801&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightA.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightA.test
 Fri Jun 26 16:22:01 2015
@@ -0,0 +1,42 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+
+C: a000 LOGIN imapuser password
+S: \* OK IMAP4rev1 Server ready
+S: a000 OK .*
+
+C: a001 MYRIGHTS user.Boby
+S: \* MYRIGHTS user.Boby a
+S: a001 OK Completed
+
+# Right "a" is sufficient to manage ACL
+
+C: a002 GETACL user.Boby
+S: \* ACL user.Boby boby lrswipkxtecda imapuser a
+S: a002 OK Completed
+
+C: a003 SETACL user.Boby benwa r
+S: a003 OK Completed
+
+C: a004 LISTRIGHTS user.Boby Boby
+S: \* LISTRIGHTS user.Boby Boby p l r s w i k x t e c d a 0 1 2 3 4 5 6 7 8 9
+S: a004 OK Completed
+
+C: a005 DELETEACL user.Boby benwa
+S: a005 OK Completed
\ No newline at end of file

Added: 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightA.test
URL: 
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightA.test?rev=1687801&view=auto
==============================================================================
--- 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightA.test
 (added)
+++ 
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightA.test
 Fri Jun 26 16:22:01 2015
@@ -0,0 +1,42 @@
+################################################################
+# Licensed to the Apache Software Foundation (ASF) under one   #
+# or more contributor license agreements.  See the NOTICE file #
+# distributed with this work for additional information        #
+# regarding copyright ownership.  The ASF licenses this file   #
+# to you under the Apache License, Version 2.0 (the            #
+# "License"); you may not use this file except in compliance   #
+# with the License.  You may obtain a copy of the License at   #
+#                                                              #
+#   http://www.apache.org/licenses/LICENSE-2.0                 #
+#                                                              #
+# Unless required by applicable law or agreed to in writing,   #
+# software distributed under the License is distributed on an  #
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       #
+# KIND, either express or implied.  See the License for the    #
+# specific language governing permissions and limitations      #
+# under the License.                                           #
+################################################################
+
+C: a000 LOGIN imapuser password
+S: \* OK IMAP4rev1 Server ready
+S: a000 OK .*
+
+C: a001 MYRIGHTS user.Boby
+S: \* MYRIGHTS user.Boby lrswipkxtecd
+S: a001 OK Completed
+
+# Right "a" is needed to manage ACL
+
+C: a002 GETACL user.Boby
+S: a002 NO Permission denied
+
+C: a003 SETACL user.Boby benwa r
+S: a003 NO Permission denied
+
+# Note : This behaviour is not RFC compliant.
+C: a004 LISTRIGHTS user.Boby Boby
+S: \* LISTRIGHTS user.Boby Boby p l r s w i k x t e c d a 0 1 2 3 4 5 6 7 8 9
+S: a004 OK Completed
+
+C: a005 DELETEACL user.Boby benwa
+S: a005 NO Permission denied
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to