manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1655208 - in /manifoldcf/branches/release-2.0-branch: ./ connectors/filenet/build-stub/src/main/java/com/filenet/api/constants/ connectors/filenet/build-stub/src/main/java/com/filenet/api/core/ connectors/filenet/build-stub/src/main/java/c...
Date Wed, 28 Jan 2015 00:58:41 GMT
Author: kwright
Date: Wed Jan 28 00:58:40 2015
New Revision: 1655208

URL: http://svn.apache.org/r1655208
Log:
Pull up more changes for CONNECTORS-1151 from trunk.

Added:
    manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/constants/SecurityPrincipalType.java
      - copied unchanged from r1655205, manifoldcf/trunk/connectors/filenet/build-stub/src/main/java/com/filenet/api/constants/SecurityPrincipalType.java
    manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/security/Group.java
      - copied unchanged from r1655205, manifoldcf/trunk/connectors/filenet/build-stub/src/main/java/com/filenet/api/security/Group.java
Modified:
    manifoldcf/branches/release-2.0-branch/   (props changed)
    manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/core/Factory.java
    manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/security/Permission.java
    manifoldcf/branches/release-2.0-branch/connectors/filenet/implementation/src/main/java/org/apache/manifoldcf/crawler/common/filenet/FilenetImpl.java

Propchange: manifoldcf/branches/release-2.0-branch/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 28 00:58:40 2015
@@ -119,4 +119,4 @@
 /manifoldcf/branches/CONNECTORS-981:1605049-1605773
 /manifoldcf/branches/CONNECTORS-989:1611600-1612101
 /manifoldcf/branches/CONNECTORS-990:1610284-1610707
-/manifoldcf/trunk:1644252,1644399,1644538,1644920,1644931,1646317,1646397,1646403,1646640,1646947,1647574,1647577,1647608,1650351,1651921,1654651-1654652
+/manifoldcf/trunk:1644252,1644399,1644538,1644920,1644931,1646317,1646397,1646403,1646640,1646947,1647574,1647577,1647608,1650351,1651921,1654651-1654652,1655205

Modified: manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/core/Factory.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/core/Factory.java?rev=1655208&r1=1655207&r2=1655208&view=diff
==============================================================================
--- manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/core/Factory.java
(original)
+++ manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/core/Factory.java
Wed Jan 28 00:58:40 2015
@@ -74,6 +74,14 @@ public class Factory
       return null;
     }
   }
+
+  public static class Group
+  {
+    public static com.filenet.api.security.Group fetchInstance(com.filenet.api.core.Connection
conn, String gname, PropertyFilter filter)
+    {
+      return null;
+    }
+  }
   
   public static class ClassDescription
   {

Modified: manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/security/Permission.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/security/Permission.java?rev=1655208&r1=1655207&r2=1655208&view=diff
==============================================================================
--- manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/security/Permission.java
(original)
+++ manifoldcf/branches/release-2.0-branch/connectors/filenet/build-stub/src/main/java/com/filenet/api/security/Permission.java
Wed Jan 28 00:58:40 2015
@@ -19,10 +19,12 @@
 package com.filenet.api.security;
 
 import com.filenet.api.core.*;
+import com.filenet.api.constants.SecurityPrincipalType;
 
 /** Stub interface to allow the connector to build fully.
 */
 public interface Permission extends EngineObject, DependentObject
 {
   public String get_GranteeName();
+  public SecurityPrincipalType get_GranteeType();
 }

Modified: manifoldcf/branches/release-2.0-branch/connectors/filenet/implementation/src/main/java/org/apache/manifoldcf/crawler/common/filenet/FilenetImpl.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-2.0-branch/connectors/filenet/implementation/src/main/java/org/apache/manifoldcf/crawler/common/filenet/FilenetImpl.java?rev=1655208&r1=1655207&r2=1655208&view=diff
==============================================================================
--- manifoldcf/branches/release-2.0-branch/connectors/filenet/implementation/src/main/java/org/apache/manifoldcf/crawler/common/filenet/FilenetImpl.java
(original)
+++ manifoldcf/branches/release-2.0-branch/connectors/filenet/implementation/src/main/java/org/apache/manifoldcf/crawler/common/filenet/FilenetImpl.java
Wed Jan 28 00:58:40 2015
@@ -434,14 +434,25 @@ public class FilenetImpl extends Unicast
           if (!gname.equals("#AUTHENTICATED-USERS"))
           {
             //System.out.println("Getting user "+gname);
-            User usr = Factory.User.fetchInstance(conn, gname, null);
-            if (usr != null)
-            {
-              // System.out.println("Docid "+docId+" view sid is "+usr.get_Id());
-              if (atval == AccessType.ALLOW_AS_INT)
-                rval.addAclValue(usr.get_Id());
-              else if (atval == AccessType.DENY_AS_INT)
-                rval.addDenyAclValue(usr.get_Id());
+            SecurityPrincipalType gtype = ap.get_GranteeType();
+            if (gtype.getValue() == SecurityPrincipalType.USER_AS_INT) {
+              User usr = Factory.User.fetchInstance(conn, gname, null);
+              if (usr != null) {
+                String sid = usr.get_Id();
+                if (atval == AccessType.ALLOW_AS_INT)
+                  rval.addAclValue(sid);
+                else if (atval == AccessType.DENY_AS_INT)
+                  rval.addDenyAclValue(sid);
+              }
+            } else {
+              Group grp = Factory.Group.fetchInstance(conn, gname, null);
+              if (grp != null) {
+                String sid = grp.get_Id();
+                if (atval == AccessType.ALLOW_AS_INT)
+                  rval.addAclValue(sid);
+                else if (atval == AccessType.DENY_AS_INT)
+                  rval.addDenyAclValue(sid);
+              }
             }
           }
           else



Mime
View raw message