Author: btellier
Date: Fri Jun 26 16:22:58 2015
New Revision: 1687804
URL: http://svn.apache.org/r1687804
Log:
MPT-14 ACL integration tests : EXPUNGE
Added:
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightRE.test
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightE.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=1687804&r1=1687803&r2=1687804&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:58 2015
@@ -116,4 +116,16 @@ public class ACLIntegration extends Base
scriptTest("aclIntegration/ACLIntegrationWithoutRightK", Locale.US);
}
+ @Test
+ public void rightREShouldBeSufficientToPerformExpungeUS() throws Exception
{
+ grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new
SimpleMailboxACL.Rfc4314Rights("re"));
+ scriptTest("aclIntegration/ACLIntegrationRightRE", Locale.US);
+ }
+
+ @Test
+ public void rightEShouldBeNeededToPerformExpungeUS() throws Exception {
+ grantRightsOnHost.grantRights(OTHER_USER_MAILBOX, USER, new
SimpleMailboxACL.Rfc4314Rights("rswipxtclak"));
+ scriptTest("aclIntegration/ACLIntegrationWithoutRightE", Locale.US);
+ }
+
}
Added:
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightRE.test
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightRE.test?rev=1687804&view=auto
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightRE.test
(added)
+++
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationRightRE.test
Fri Jun 26 16:22:58 2015
@@ -0,0 +1,45 @@
+################################################################
+# 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 red
+S: a001 OK Completed
+
+# Right "r" is sufficient to perform a SELECT
+C: a002 SELECT user.Boby
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* FLAGS \(\\Answered \\Flagged \\Draft \\Deleted \\Seen\)
+S: \* OK \[PERMANENTFLAGS \(\)\] Ok
+S: \* OK \[UIDVALIDITY .*
+S: \* OK \[UIDNEXT 1\] Ok
+S: \* OK \[HIGHESTMODSEQ 2\] Ok
+S: \* OK \[URLMECH INTERNAL\] Ok
+S: a002 OK \[READ-WRITE\] Completed
+
+C: a003 EXPUNGE
+S: a003 OK Completed
+
+# Close the selected mailbox.
+C: a004 CLOSE
+S: a004 OK Completed
Added:
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightE.test
URL:
http://svn.apache.org/viewvc/james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightE.test?rev=1687804&view=auto
==============================================================================
---
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightE.test
(added)
+++
james/mpt/trunk/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/aclIntegration/ACLIntegrationWithoutRightE.test
Fri Jun 26 16:22:58 2015
@@ -0,0 +1,45 @@
+################################################################
+# 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 lrswipkxtcda
+S: a001 OK Completed
+
+# Right "r" is sufficient to perform a SELECT
+C: a002 SELECT user.Boby
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* FLAGS \(\\Answered \\Flagged \\Draft \\Deleted \\Seen\)
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Flagged \\Draft \\Deleted \\Seen
\\\*\)\] Ok
+S: \* OK \[UIDVALIDITY .*
+S: \* OK \[UIDNEXT 1\] Ok
+S: \* OK \[HIGHESTMODSEQ 2\] Ok
+S: \* OK \[URLMECH INTERNAL\] Ok
+S: a002 OK \[READ-WRITE\] Completed
+
+C: a003 EXPUNGE
+S: a003 NO Permission denied
+
+# Close the selected mailbox.
+C: a004 CLOSE
+S: a004 OK Completed
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]