Author: btellier
Date: Fri Jun 26 16:21:37 2015
New Revision: 1687800
URL: http://svn.apache.org/r1687800
Log:
MPT-14 ACL integration tests : LIST LSUB SUBSCRIBE
Added:
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightL.test
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightL.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=1687800&r1=1687799&r2=1687800&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:21:37 2015
@@ -60,4 +60,16 @@ public class ACLIntegration extends Base
scriptTest("aclIntegration/ACLIntegrationWithoutRightR", Locale.US);
}
+ @Test
+ public void rightLShouldBeSufficientToPerformListUS() throws Exception {
+ grantRightsOnHost.grantRights(USER, OTHER_USER_MAILBOX, "l");
+ scriptTest("aclIntegration/ACLIntegrationRightL", Locale.US);
+ }
+
+ @Test
+ public void rightLShouldBeNeededToPerformListLsubSubscribeUS() throws
Exception {
+ grantRightsOnHost.grantRights(USER, OTHER_USER_MAILBOX,
"rswipkxtecda");
+ scriptTest("aclIntegration/ACLIntegrationWithoutRightL", Locale.US);
+ }
+
}
Added:
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightL.test
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightL.test?rev=1687800&view=auto
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightL.test
(added)
+++
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightL.test
Fri Jun 26 16:21:37 2015
@@ -0,0 +1,40 @@
+################################################################
+# 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 l
+S: a001 OK Completed
+
+# Right "l" is sufficient to perform a LIST
+C: a002 LIST "user." "Boby"
+S: \* LIST \(\\HasNoChildren\) "." user.Boby
+S: a002 OK Completed.*
+
+# Right "l" is sufficient to perform a SUBSCRIBE
+C: a003 SUBSCRIBE user.Boby
+S: a003 OK Completed
+
+# Right "l" is sufficient to perform a LSUB
+C: a004 LSUB "user." "Boby"
+S: \* LSUB \(\) "." user.Boby
+S: a004 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/ACLIntegrationWithoutRightL.test
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightL.test?rev=1687800&view=auto
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightL.test
(added)
+++
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightL.test
Fri Jun 26 16:21:37 2015
@@ -0,0 +1,40 @@
+################################################################
+# 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 rswipkxtecda
+S: a001 OK Completed
+
+# Right "l" is needed to perform a LIST
+# No results will be returned
+C: a002 LIST "user." "Boby"
+S: a002 OK Completed.*
+
+# Right "l" is sufficient to perform a SUBSCRIBE
+C: a003 SUBSCRIBE user.Boby
+S: a003 NO Subscribe: Mailbox does not exist
+
+# Right "l" is sufficient to perform a LSUB
+# No results will be returned
+C: a004 LSUB "user." "Boby"
+S: a004 OK Completed.*
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]