manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1534822 - /manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SPSProxyHelper.java
Date Tue, 22 Oct 2013 22:13:01 GMT
Author: kwright
Date: Tue Oct 22 22:13:01 2013
New Revision: 1534822

URL: http://svn.apache.org/r1534822
Log:
Hook up roles

Modified:
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SPSProxyHelper.java

Modified: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SPSProxyHelper.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SPSProxyHelper.java?rev=1534822&r1=1534821&r2=1534822&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SPSProxyHelper.java
(original)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SPSProxyHelper.java
Tue Oct 22 22:13:01 2013
@@ -217,7 +217,39 @@ public class SPSProxyHelper {
       }
 
       // Not specified in doc and must be determined experimentally
-      // MHL
+      /*
+<ns1:GetRoleCollectionFromUser xmlns:ns1="http://schemas.microsoft.com/sharepoint/soap/directory/">
+  <ns1:Roles>
+    <ns1:Role ID="1073741825" Name="Limited Access" Description="Can view specific lists,
document libraries, list items, folders, or documents when given permissions."
+      Order="160" Hidden="True" Type="Guest" BasePermissions="ViewFormPages, Open, BrowseUserInfo,
UseClientIntegration, UseRemoteAPIs"/>
+  </ns1:Roles>
+</ns1:GetRoleCollectionFromUser>'
+      */
+      
+      MessageElement roles = rolesList[0];
+      if (!groups.getElementName().getLocalName().equals("GetRoleCollectionFromUser"))
+        throw new ManifoldCFException("Bad response - outer node should have been 'GetRoleCollectionFromUser'
node");
+          
+      Iterator rolesIter = roles.getChildElements();
+      while (rolesIter.hasNext())
+      {
+        MessageElement child = (MessageElement)rolesIter.next();
+        if (child.getElementName().getLocalName().equals("Roles"))
+        {
+          Iterator roleIter = child.getChildElements();
+          while (roleIter.hasNext())
+          {
+            MessageElement role = (MessageElement)roleIter.next();
+            if (role.getElementName().getLocalName().equals("Role"))
+            {
+              String roleID = role.getAttribute("ID");
+              String roleName = role.getAttribute("Name");
+              // Add to the access token list
+              accessTokens.add("R"+roleID);
+            }
+          }
+        }
+      }
       
       return accessTokens;
     }



Mime
View raw message