chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1510974 - /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/control/ACLSmokeTest.java
Date Tue, 06 Aug 2013 14:37:11 GMT
Author: fmui
Date: Tue Aug  6 14:37:10 2013
New Revision: 1510974

URL: http://svn.apache.org/r1510974
Log:
CMIS-698: TCK: check controllableACL before applying ACL

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=1510974&r1=1510973&r2=1510974&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
Tue Aug  6 14:37:10 2013
@@ -20,6 +20,7 @@ package org.apache.chemistry.opencmis.tc
 
 import static org.apache.chemistry.opencmis.tck.CmisTestResultStatus.FAILURE;
 import static org.apache.chemistry.opencmis.tck.CmisTestResultStatus.SKIPPED;
+import static org.apache.chemistry.opencmis.tck.CmisTestResultStatus.INFO;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -91,7 +92,8 @@ public class ACLSmokeTest extends Abstra
                     }
                 }
 
-                if (getAclCapability(session) == CapabilityAcl.MANAGE) {
+                if (getAclCapability(session) == CapabilityAcl.MANAGE
+                        && !Boolean.FALSE.equals(doc.getType().isControllableAcl()))
{
                     String principal = getParameters().get(TestParameters.DEFAULT_ACL_PRINCIPAL);
                     if (principal == null) {
                         principal = TestParameters.DEFAULT_ACL_PRINCIPAL_VALUE;
@@ -106,11 +108,13 @@ public class ACLSmokeTest extends Abstra
                     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")));
+                        aces.add(session.getObjectFactory().createAce(principal, Collections.singletonList("cmis:all")));
 
                         session.setAcl(doc, aces);
                     }
+                } else {
+                    addResult(createResult(INFO, "The repository or the type '" + doc.getType().getId()
+                            + "' don't support managing ACLs."));
                 }
 
                 deleteObject(doc);



Mime
View raw message