chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1407169 - /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/control/ACLSmokeTest.java
Date Thu, 08 Nov 2012 17:07:20 GMT
Author: fmui
Date: Thu Nov  8 17:07:20 2012
New Revision: 1407169

URL: http://svn.apache.org/viewvc?rev=1407169&view=rev
Log:
CMIS-600: fixed TCK ACL test

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/control/ACLSmokeTest.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/control/ACLSmokeTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/control/ACLSmokeTest.java?rev=1407169&r1=1407168&r2=1407169&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/control/ACLSmokeTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/control/ACLSmokeTest.java
Thu Nov  8 17:07:20 2012
@@ -22,7 +22,6 @@ import static org.apache.chemistry.openc
 import static org.apache.chemistry.opencmis.tck.CmisTestResultStatus.SKIPPED;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
@@ -33,6 +32,7 @@ import org.apache.chemistry.opencmis.cli
 import org.apache.chemistry.opencmis.commons.data.Ace;
 import org.apache.chemistry.opencmis.commons.data.Acl;
 import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
+import org.apache.chemistry.opencmis.commons.enums.AclPropagation;
 import org.apache.chemistry.opencmis.commons.enums.CapabilityAcl;
 import org.apache.chemistry.opencmis.tck.CmisTestResult;
 import org.apache.chemistry.opencmis.tck.impl.AbstractSessionTest;
@@ -97,17 +97,20 @@ public class ACLSmokeTest extends Abstra
                         principal = TestParameters.DEFAULT_ACL_PRINCIPAL_VALUE;
                     }
 
-                    // apply permission "cmis:read"
+                    // apply permission "cmis:write"
                     List<Ace> aces = new ArrayList<Ace>();
-                    aces.add(session.getObjectFactory().createAce(principal, Collections.singletonList("cmis:read")));
+                    aces.add(session.getObjectFactory().createAce(principal, Collections.singletonList("cmis:write")));
 
                     session.applyAcl(doc, aces, null, null);
 
-                    // set permission "cmis:read" and "cmis:write"
-                    aces = new ArrayList<Ace>();
-                    aces.add(session.getObjectFactory().createAce(principal, Arrays.asList("cmis:all")));
+                    if (session.getRepositoryInfo().getAclCapabilities().getAclPropagation()
!= AclPropagation.REPOSITORYDETERMINED) {
+                        // set permission "cmis:all"
+                        aces = new ArrayList<Ace>();
+                        aces.add(session.getObjectFactory()
+                                .createAce(principal, Collections.singletonList("cmis:all")));
 
-                    session.setAcl(doc, aces);
+                        session.setAcl(doc, aces);
+                    }
                 }
 
                 deleteObject(doc);



Mime
View raw message