Browse code

** review

Thomas Fricker authored on 17/06/2019 15:44:29
Showing 1 changed files
... ...
@@ -27,6 +27,7 @@ import static org.junit.Assert.fail;
27 27
 
28 28
 import java.io.IOException;
29 29
 import java.io.InputStream;
30
+import java.util.ArrayList;
30 31
 import java.util.Arrays;
31 32
 import java.util.Collection;
32 33
 import java.util.Collections;
... ...
@@ -833,6 +834,13 @@ public class ReplicationStackTests extends AbstractRollingReplicationTests {
833 834
 
834 835
 		System.err.println("Before create.....");
835 836
 		mailshareApi.create(mailshare.name, mailshare);
837
+
838
+		IContainerManagement c = ServerSideServiceProvider.getProvider(SecurityContext.SYSTEM)
839
+				.instance(IContainerManagement.class, IMailboxAclUids.uidForMailbox(mailshare.name));
840
+		List<AccessControlEntry> accessControlList = new ArrayList<>(c.getAccessControlList());
841
+		accessControlList.add(AccessControlEntry.create(userUid, Verb.Write));
842
+		c.setAccessControlList(accessControlList);
843
+
836 844
 		allEvents.get(10, TimeUnit.SECONDS);
837 845
 		MailboxReplicaRootDescriptor created = onRoot.get();
838 846
 		assertNotNull(created);
... ...
@@ -1988,6 +1996,12 @@ public class ReplicationStackTests extends AbstractRollingReplicationTests {
1988 1996
 
1989 1997
 		mailshareApi.create(mailshareUid, mailshare);
1990 1998
 
1999
+		IContainerManagement c = ServerSideServiceProvider.getProvider(SecurityContext.SYSTEM)
2000
+				.instance(IContainerManagement.class, IMailboxAclUids.uidForMailbox(mailshareUid));
2001
+		List<AccessControlEntry> accessControlList = new ArrayList<>(c.getAccessControlList());
2002
+		accessControlList.add(AccessControlEntry.create(userUid, Verb.Write));
2003
+		c.setAccessControlList(accessControlList);
2004
+
1991 2005
 		Thread.sleep(1000);
1992 2006
 
1993 2007
 		IContainersFlatHierarchy hierarchyApi = prov.instance(IContainersFlatHierarchy.class, domainUid, mailshareUid);