chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1455453 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
Date Tue, 12 Mar 2013 09:01:44 GMT
Author: jens
Date: Tue Mar 12 09:01:44 2013
New Revision: 1455453

URL: http://svn.apache.org/r1455453
Log:
InMemory: set ACL allowable actions

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java?rev=1455453&r1=1455452&r2=1455453&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-inmemory/src/main/java/org/apache/chemistry/opencmis/inmemory/DataObjectCreator.java
Tue Mar 12 09:01:44 2013
@@ -68,6 +68,8 @@ public class DataObjectCreator {
         boolean hasContent = so instanceof Content && ((Content) so).hasContent();
         boolean isRootFolder = isFolder && ((Folder)so).getParent() == null;
         boolean hasRendition = so.hasRendition(user);
+        boolean canGetAcl = user != null && (isDocument || isFolder);
+        boolean canSetAcl = canGetAcl;
         
         if (so instanceof Version) {
             isCheckedOut = ((Version) so).isPwc();
@@ -140,6 +142,11 @@ public class DataObjectCreator {
             set.add(Action.CAN_GET_RENDITIONS);
         }
         
+        if (canSetAcl) 
+            set.add(Action.CAN_APPLY_ACL);
+        if (canGetAcl) 
+            set.add(Action.CAN_GET_ACL);
+       
         allowableActions.setAllowableActions(set);
         return allowableActions;
     }



Mime
View raw message