manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1531529 - in /manifoldcf/branches/CONNECTORS-754: ./ connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/ connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connec...
Date Sat, 12 Oct 2013 13:10:06 GMT
Author: kwright
Date: Sat Oct 12 13:10:05 2013
New Revision: 1531529

URL: http://svn.apache.org/r1531529
Log:
More work on SharePoint authority.

Added:
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointConfig.java
  (with props)
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_AuthorityType.html
  (with props)
Modified:
    manifoldcf/branches/CONNECTORS-754/build.xml
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointAuthority.java
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointConfig.java
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_en_US.properties
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_ja_JP.properties
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/sharepoint/editConfiguration_Server.html
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_Server.html
    manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/viewConfiguration.html

Modified: manifoldcf/branches/CONNECTORS-754/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/build.xml?rev=1531529&r1=1531528&r2=1531529&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-754/build.xml Sat Oct 12 13:10:05 2013
@@ -2412,6 +2412,11 @@
             <param name="connector-label" value="SharePoint"/>
             <param name="connector-class" value="org.apache.manifoldcf.crawler.connectors.sharepoint.SharePointRepository"/>
         </antcall>
+        <antcall target="general-add-authority-connector">
+            <param name="connector-name" value="sharepoint"/>
+            <param name="connector-label" value="SharePoint"/>
+            <param name="connector-class" value="org.apache.manifoldcf.authorities.authorities.sharepoint.SharePointAuthority"/>
+        </antcall>
     </target>
     
     <target name="deliver-sharepoint-connector-doc" depends="calculate-sharepoint-doc-condition"
if="sharepoint-doc.include">

Modified: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointAuthority.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointAuthority.java?rev=1531529&r1=1531528&r2=1531529&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointAuthority.java
(original)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointAuthority.java
Sat Oct 12 13:10:05 2013
@@ -102,38 +102,21 @@ public class SharePointAuthority extends
     // Set up the DC param set, and the rules
     dCRules = new ArrayList<DCRule>();
     dCConnectionParameters = new HashMap<String,DCConnectionParameters>();
-    // For backwards compatibility, look at old-style parameters
-    String domainControllerName = params.getParameter(SharePointConfig.PARAM_DOMAINCONTROLLER);
-    String userName = params.getParameter(SharePointConfig.PARAM_USERNAME);
-    String password = params.getObfuscatedParameter(SharePointConfig.PARAM_PASSWORD);
-    String authentication = params.getParameter(SharePointConfig.PARAM_AUTHENTICATION);
-    String userACLsUsername = params.getParameter(SharePointConfig.PARAM_USERACLsUSERNAME);
-    if (domainControllerName != null)
-    {
-      // Map the old-style parameters into the new-style structures.
-      dCConnectionParameters.put(domainControllerName,new DCConnectionParameters(userName,password,authentication,userACLsUsername));
-      // Create a single rule, too
-      dCRules.add(new DCRule("",domainControllerName));
-    }
-    else
+    // Read DC info from the config parameters
+    for (int i = 0; i < params.getChildCount(); i++)
     {
-      // New-style parameters.  Read from the config info.
-      int i = 0;
-      while (i < params.getChildCount())
+      ConfigNode cn = params.getChild(i);
+      if (cn.getType().equals(SharePointConfig.NODE_DOMAINCONTROLLER))
       {
-        ConfigNode cn = params.getChild(i++);
-        if (cn.getType().equals(SharePointConfig.NODE_DOMAINCONTROLLER))
-        {
-          // Domain controller name is the actual key...
-          String dcName = cn.getAttributeValue(SharePointConfig.ATTR_DOMAINCONTROLLER);
-          // Set up the parameters for the domain controller
-          dCConnectionParameters.put(dcName,new DCConnectionParameters(cn.getAttributeValue(SharePointConfig.ATTR_USERNAME),
-            deobfuscate(cn.getAttributeValue(SharePointConfig.ATTR_PASSWORD)),
-            cn.getAttributeValue(SharePointConfig.ATTR_AUTHENTICATION),
-            cn.getAttributeValue(SharePointConfig.ATTR_USERACLsUSERNAME)));
-          // Order-based rule, as well
-          dCRules.add(new DCRule(cn.getAttributeValue(SharePointConfig.ATTR_SUFFIX),dcName));
-        }
+        // Domain controller name is the actual key...
+        String dcName = cn.getAttributeValue(SharePointConfig.ATTR_DOMAINCONTROLLER);
+        // Set up the parameters for the domain controller
+        dCConnectionParameters.put(dcName,new DCConnectionParameters(cn.getAttributeValue(SharePointConfig.ATTR_USERNAME),
+          deobfuscate(cn.getAttributeValue(SharePointConfig.ATTR_PASSWORD)),
+          cn.getAttributeValue(SharePointConfig.ATTR_AUTHENTICATION),
+          cn.getAttributeValue(SharePointConfig.ATTR_USERACLsUSERNAME)));
+        // Order-based rule, as well
+        dCRules.add(new DCRule(cn.getAttributeValue(SharePointConfig.ATTR_SUFFIX),dcName));
       }
     }
     
@@ -461,6 +444,7 @@ public class SharePointAuthority extends
     throws ManifoldCFException, IOException
   {
     tabsArray.add(Messages.getString(locale,"SharePointAuthority.DomainController"));
+    tabsArray.add(Messages.getString(locale,"SharePointAuthority.Server"));
     tabsArray.add(Messages.getString(locale,"SharePointAuthority.Cache"));
     Messages.outputResourceWithVelocity(out,locale,"editConfiguration.js",null);
   }
@@ -482,42 +466,98 @@ public class SharePointAuthority extends
     velocityContext.put("TabName",tabName);
     fillInDomainControllerTab(velocityContext,out,parameters);
     fillInCacheTab(velocityContext,out,parameters);
+    fillInServerTab(velocityContext,out,parameters);
     Messages.outputResourceWithVelocity(out,locale,"editConfiguration_DomainController.html",velocityContext);
     Messages.outputResourceWithVelocity(out,locale,"editConfiguration_Cache.html",velocityContext);
+    Messages.outputResourceWithVelocity(out,locale,"editConfiguration_Server.html",velocityContext);
   }
   
+  protected static void fillInServerTab(Map<String,Object> velocityContext, IHTTPOutput
out, ConfigParams parameters)
+    throws ManifoldCFException
+  {
+    String serverVersion = parameters.getParameter(SharePointConfig.PARAM_SERVERVERSION);
+    if (serverVersion == null)
+      serverVersion = "2.0";
+
+    String serverProtocol = parameters.getParameter(SharePointConfig.PARAM_SERVERPROTOCOL);
+    if (serverProtocol == null)
+      serverProtocol = "http";
+
+    String serverName = parameters.getParameter(SharePointConfig.PARAM_SERVERNAME);
+    if (serverName == null)
+      serverName = "localhost";
+
+    String serverPort = parameters.getParameter(SharePointConfig.PARAM_SERVERPORT);
+    if (serverPort == null)
+      serverPort = "";
+
+    String serverLocation = parameters.getParameter(SharePointConfig.PARAM_SERVERLOCATION);
+    if (serverLocation == null)
+      serverLocation = "";
+      
+    String userName = parameters.getParameter(SharePointConfig.PARAM_SERVERUSERNAME);
+    if (userName == null)
+      userName = "";
+
+    String password = parameters.getObfuscatedParameter(SharePointConfig.PARAM_SERVERPASSWORD);
+    if (password == null)
+      password = "";
+    else
+      password = out.mapPasswordToKey(password);
+
+    String keystore = parameters.getParameter(SharePointConfig.PARAM_SERVERKEYSTORE);
+    IKeystoreManager localKeystore;
+    if (keystore == null)
+      localKeystore = KeystoreManagerFactory.make("");
+    else
+      localKeystore = KeystoreManagerFactory.make("",keystore);
+
+    List<Map<String,String>> certificates = new ArrayList<Map<String,String>>();
+    
+    String[] contents = localKeystore.getContents();
+    for (String alias : contents)
+    {
+      String description = localKeystore.getDescription(alias);
+      if (description.length() > 128)
+        description = description.substring(0,125) + "...";
+      Map<String,String> certificate = new HashMap<String,String>();
+      certificate.put("ALIAS", alias);
+      certificate.put("DESCRIPTION", description);
+      certificates.add(certificate);
+    }
+    
+    // Fill in context
+    velocityContext.put("SERVERVERSION", serverVersion);
+    velocityContext.put("SERVERPROTOCOL", serverProtocol);
+    velocityContext.put("SERVERNAME", serverName);
+    velocityContext.put("SERVERPORT", serverPort);
+    velocityContext.put("SERVERLOCATION", serverLocation);
+    velocityContext.put("USERNAME", userName);
+    velocityContext.put("PASSWORD", password);
+    if (keystore != null)
+      velocityContext.put("KEYSTORE", keystore);
+    velocityContext.put("CERTIFICATELIST", certificates);
+    
+  }
+
   protected static void fillInDomainControllerTab(Map<String,Object> velocityContext,
IPasswordMapperActivity mapper, ConfigParams parameters)
   {
-    String domainControllerName = parameters.getParameter(SharePointConfig.PARAM_DOMAINCONTROLLER);
-    String userName = parameters.getParameter(SharePointConfig.PARAM_USERNAME);
-    String password = parameters.getObfuscatedParameter(SharePointConfig.PARAM_PASSWORD);
-    String authentication = parameters.getParameter(SharePointConfig.PARAM_AUTHENTICATION);
-    String userACLsUsername = parameters.getParameter(SharePointConfig.PARAM_USERACLsUSERNAME);
     List<Map<String,String>> domainControllers = new ArrayList<Map<String,String>>();
     
-    // Backwards compatibility: if domain controller parameter is set, create an entry in
the map.
-    if (domainControllerName != null)
+    // Go through nodes looking for DC nodes
+    for (int i = 0; i < parameters.getChildCount(); i++)
     {
-      domainControllers.add(createDomainControllerMap(mapper,"",domainControllerName,userName,password,authentication,userACLsUsername));
-    }
-    else
-    {
-      // Go through nodes looking for DC nodes
-      int i = 0;
-      while (i < parameters.getChildCount())
+      ConfigNode cn = parameters.getChild(i);
+      if (cn.getType().equals(SharePointConfig.NODE_DOMAINCONTROLLER))
       {
-        ConfigNode cn = parameters.getChild(i++);
-        if (cn.getType().equals(SharePointConfig.NODE_DOMAINCONTROLLER))
-        {
-          // Grab the info
-          String dcSuffix = cn.getAttributeValue(SharePointConfig.ATTR_SUFFIX);
-          String dcDomainController = cn.getAttributeValue(SharePointConfig.ATTR_DOMAINCONTROLLER);
-          String dcUserName = cn.getAttributeValue(SharePointConfig.ATTR_USERNAME);
-          String dcPassword = deobfuscate(cn.getAttributeValue(SharePointConfig.ATTR_PASSWORD));
-          String dcAuthentication = cn.getAttributeValue(SharePointConfig.ATTR_AUTHENTICATION);
-          String dcUserACLsUsername = cn.getAttributeValue(SharePointConfig.ATTR_USERACLsUSERNAME);
-          domainControllers.add(createDomainControllerMap(mapper,dcSuffix,dcDomainController,dcUserName,dcPassword,dcAuthentication,dcUserACLsUsername));
-        }
+        // Grab the info
+        String dcSuffix = cn.getAttributeValue(SharePointConfig.ATTR_SUFFIX);
+        String dcDomainController = cn.getAttributeValue(SharePointConfig.ATTR_DOMAINCONTROLLER);
+        String dcUserName = cn.getAttributeValue(SharePointConfig.ATTR_USERNAME);
+        String dcPassword = deobfuscate(cn.getAttributeValue(SharePointConfig.ATTR_PASSWORD));
+        String dcAuthentication = cn.getAttributeValue(SharePointConfig.ATTR_AUTHENTICATION);
+        String dcUserACLsUsername = cn.getAttributeValue(SharePointConfig.ATTR_USERACLsUSERNAME);
+        domainControllers.add(createDomainControllerMap(mapper,dcSuffix,dcDomainController,dcUserName,dcPassword,dcAuthentication,dcUserACLsUsername));
       }
     }
     velocityContext.put("DOMAINCONTROLLERS",domainControllers);
@@ -570,12 +610,6 @@ public class SharePointAuthority extends
     String x = variableContext.getParameter("dcrecord_count");
     if (x != null)
     {
-      // Delete old stuff
-      parameters.setParameter(SharePointConfig.PARAM_DOMAINCONTROLLER,null);
-      parameters.setParameter(SharePointConfig.PARAM_USERNAME,null);
-      parameters.setParameter(SharePointConfig.PARAM_PASSWORD,null);
-      parameters.setParameter(SharePointConfig.PARAM_AUTHENTICATION,null);
-      parameters.setParameter(SharePointConfig.PARAM_USERACLsUSERNAME,null);
       // Delete old nodes
       int i = 0;
       while (i < parameters.getChildCount())
@@ -633,6 +667,8 @@ public class SharePointAuthority extends
           variableContext.getParameter("dcrecord_userACLsUsername"));
       }
     }
+
+    // Cache parameters
     
     String cacheLifetime = variableContext.getParameter("cachelifetime");
     if (cacheLifetime != null)
@@ -641,6 +677,96 @@ public class SharePointAuthority extends
     if (cacheLRUsize != null)
       parameters.setParameter(SharePointConfig.PARAM_CACHELRUSIZE,cacheLRUsize);
     
+    // SharePoint server parameters
+    
+    String serverVersion = variableContext.getParameter("serverVersion");
+    if (serverVersion != null)
+      parameters.setParameter(SharePointConfig.PARAM_SERVERVERSION,serverVersion);
+
+    String serverProtocol = variableContext.getParameter("serverProtocol");
+    if (serverProtocol != null)
+      parameters.setParameter(SharePointConfig.PARAM_SERVERPROTOCOL,serverProtocol);
+
+    String serverName = variableContext.getParameter("serverName");
+
+    if (serverName != null)
+      parameters.setParameter(SharePointConfig.PARAM_SERVERNAME,serverName);
+
+    String serverPort = variableContext.getParameter("serverPort");
+    if (serverPort != null)
+      parameters.setParameter(SharePointConfig.PARAM_SERVERPORT,serverPort);
+
+    String serverLocation = variableContext.getParameter("serverLocation");
+    if (serverLocation != null)
+      parameters.setParameter(SharePointConfig.PARAM_SERVERLOCATION,serverLocation);
+
+    String userName = variableContext.getParameter("userName");
+    if (userName != null)
+      parameters.setParameter(SharePointConfig.PARAM_SERVERUSERNAME,userName);
+
+    String password = variableContext.getParameter("password");
+    if (password != null)
+      parameters.setObfuscatedParameter(SharePointConfig.PARAM_SERVERPASSWORD,variableContext.mapKeyToPassword(password));
+
+    String keystoreValue = variableContext.getParameter("keystoredata");
+    if (keystoreValue != null)
+      parameters.setParameter(SharePointConfig.PARAM_SERVERKEYSTORE,keystoreValue);
+
+    String configOp = variableContext.getParameter("configop");
+    if (configOp != null)
+    {
+      if (configOp.equals("Delete"))
+      {
+        String alias = variableContext.getParameter("shpkeystorealias");
+        keystoreValue = parameters.getParameter(SharePointConfig.PARAM_SERVERKEYSTORE);
+        IKeystoreManager mgr;
+        if (keystoreValue != null)
+          mgr = KeystoreManagerFactory.make("",keystoreValue);
+        else
+          mgr = KeystoreManagerFactory.make("");
+        mgr.remove(alias);
+        parameters.setParameter(SharePointConfig.PARAM_SERVERKEYSTORE,mgr.getString());
+      }
+      else if (configOp.equals("Add"))
+      {
+        String alias = IDFactory.make(threadContext);
+        byte[] certificateValue = variableContext.getBinaryBytes("shpcertificate");
+        keystoreValue = parameters.getParameter(SharePointConfig.PARAM_SERVERKEYSTORE);
+        IKeystoreManager mgr;
+        if (keystoreValue != null)
+          mgr = KeystoreManagerFactory.make("",keystoreValue);
+        else
+          mgr = KeystoreManagerFactory.make("");
+        java.io.InputStream is = new java.io.ByteArrayInputStream(certificateValue);
+        String certError = null;
+        try
+        {
+          mgr.importCertificate(alias,is);
+        }
+        catch (Throwable e)
+        {
+          certError = e.getMessage();
+        }
+        finally
+        {
+          try
+          {
+            is.close();
+          }
+          catch (IOException e)
+          {
+            // Don't report anything
+          }
+        }
+
+        if (certError != null)
+        {
+          // Redirect to error page
+          return "Illegal certificate: "+certError;
+        }
+        parameters.setParameter(SharePointConfig.PARAM_SERVERKEYSTORE,mgr.getString());
+      }
+    }
     return null;
   }
   
@@ -677,6 +803,7 @@ public class SharePointAuthority extends
     Map<String,Object> velocityContext = new HashMap<String,Object>();
     fillInDomainControllerTab(velocityContext,out,parameters);
     fillInCacheTab(velocityContext,out,parameters);
+    fillInServerTab(velocityContext,out,parameters);
     Messages.outputResourceWithVelocity(out,locale,"viewConfiguration.html",velocityContext);
   }
 

Modified: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointConfig.java?rev=1531529&r1=1531528&r2=1531529&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointConfig.java
(original)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/sharepoint/SharePointConfig.java
Sat Oct 12 13:10:05 2013
@@ -19,7 +19,7 @@
 package org.apache.manifoldcf.authorities.authorities.sharepoint;
 
 
-/** Parameters and output data for Active Directory authority.
+/** Parameters and output data for SharePoint authority.
 */
 public class SharePointConfig
 {
@@ -27,21 +27,30 @@ public class SharePointConfig
 
   // Configuration parameters
 
-  /** Domain controller */
-  public static final String PARAM_DOMAINCONTROLLER = "Domain controller";
-  /** Administrative user name */
-  public static final String PARAM_USERNAME = "User name";
-  /** Administrative password */
-  public static final String PARAM_PASSWORD = "Password";
-  /** Authentication */
-  public static final String PARAM_AUTHENTICATION = "Authentication";
-  /** UserACLs username attribute */
-  public static final String PARAM_USERACLsUSERNAME = "UserACLs username attribute";
   /** Cache lifetime */
   public static final String PARAM_CACHELIFETIME = "Cache lifetime";
   /** Cache LRU size */
   public static final String PARAM_CACHELRUSIZE = "Cache LRU size";
 
+  /** SharePoint server version */
+  public static final String PARAM_SERVERVERSION = "serverVersion";
+  /** SharePoint server protocol */
+  public static final String PARAM_SERVERPROTOCOL = "serverProtocol";
+  /** SharePoint server name */
+  public static final String PARAM_SERVERNAME = "serverName";
+  /** SharePoint server port */
+  public static final String PARAM_SERVERPORT = "serverPort";
+  /** SharePoint server location */
+  public static final String PARAM_SERVERLOCATION = "serverLocation";
+  /** SharePoint server user name */
+  public static final String PARAM_SERVERUSERNAME = "userName";
+  /** SharePoint server password */
+  public static final String PARAM_SERVERPASSWORD = "password";
+  /** SharePoint server certificate store */
+  public static final String PARAM_SERVERKEYSTORE = "keystore";
+
+  // Nodes
+  
   /** Domain controller node */
   public static final String NODE_DOMAINCONTROLLER = "domaincontroller";
   

Added: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointConfig.java?rev=1531529&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointConfig.java
(added)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointConfig.java
Sat Oct 12 13:10:05 2013
@@ -0,0 +1,49 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.crawler.connectors.sharepoint;
+
+
+/** Parameters and output data for SharePoint repository.
+*/
+public class SharePointConfig
+{
+  public static final String _rcsid = "@(#)$Id$";
+
+  // Configuration parameters
+
+  /** SharePoint server version */
+  public static final String PARAM_SERVERVERSION = "serverVersion";
+  /** SharePoint server protocol */
+  public static final String PARAM_SERVERPROTOCOL = "serverProtocol";
+  /** SharePoint server name */
+  public static final String PARAM_SERVERNAME = "serverName";
+  /** SharePoint server port */
+  public static final String PARAM_SERVERPORT = "serverPort";
+  /** SharePoint server location */
+  public static final String PARAM_SERVERLOCATION = "serverLocation";
+  /** SharePoint server user name */
+  public static final String PARAM_SERVERUSERNAME = "userName";
+  /** SharePoint server password */
+  public static final String PARAM_SERVERPASSWORD = "password";
+  /** SharePoint server certificate store */
+  public static final String PARAM_SERVERKEYSTORE = "keystore";
+	
+  /** Authority type */
+  public static final String PARAM_AUTHORITYTYPE = "authorityType";
+}

Propchange: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointConfig.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointConfig.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1531529&r1=1531528&r2=1531529&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
(original)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Sat Oct 12 13:10:05 2013
@@ -144,19 +144,19 @@ public class SharePointRepository extend
   {
     if (proxy == null)
     {
-      String serverVersion = params.getParameter( "serverVersion" );
+      String serverVersion = params.getParameter( SharePointConfig.PARAM_SERVERVERSION );
       if (serverVersion == null)
         serverVersion = "2.0";
       supportsItemSecurity = !serverVersion.equals("2.0");
       dspStsWorks = !serverVersion.equals("4.0");
       attachmentsSupported = !serverVersion.equals("2.0");
 
-      serverProtocol = params.getParameter( "serverProtocol" );
+      serverProtocol = params.getParameter( SharePointConfig.PARAM_SERVERPROTOCOL );
       if (serverProtocol == null)
         serverProtocol = "http";
       try
       {
-        String serverPort = params.getParameter( "serverPort" );
+        String serverPort = params.getParameter( SharePointConfig.PARAM_SERVERPORT );
         if (serverPort == null || serverPort.length() == 0)
         {
           if (serverProtocol.equals("https"))
@@ -171,7 +171,7 @@ public class SharePointRepository extend
       {
         throw new ManifoldCFException(e.getMessage(),e);
       }
-      serverLocation = params.getParameter("serverLocation");
+      serverLocation = params.getParameter(SharePointConfig.PARAM_SERVERLOCATION);
       if (serverLocation == null)
         serverLocation = "";
       if (serverLocation.endsWith("/"))
@@ -181,8 +181,8 @@ public class SharePointRepository extend
       encodedServerLocation = serverLocation;
       serverLocation = decodePath(serverLocation);
 
-      userName = params.getParameter( "userName" );
-      password = params.getObfuscatedParameter( "password" );
+      userName = params.getParameter(SharePointConfig.PARAM_SERVERUSERNAME);
+      password = params.getObfuscatedParameter(SharePointConfig.PARAM_SERVERPASSWORD);
       int index = userName.indexOf("\\");
       if (index != -1)
       {
@@ -208,7 +208,7 @@ public class SharePointRepository extend
       }
 
       // Set up ssl if indicated
-      keystoreData = params.getParameter( "keystore" );
+      keystoreData = params.getParameter(SharePointConfig.PARAM_SERVERKEYSTORE);
 
       PoolingClientConnectionManager localConnectionManager = new PoolingClientConnectionManager();
       localConnectionManager.setMaxTotal(1);
@@ -2296,6 +2296,7 @@ public class SharePointRepository extend
     throws ManifoldCFException, IOException
   {
     tabsArray.add(Messages.getString(locale,"SharePointRepository.Server"));
+    tabsArray.add(Messages.getString(locale,"SharePointRepository.AuthorityType"));
     Messages.outputResourceWithVelocity(out,locale,"editConfiguration.js",null);
   }
   
@@ -2316,7 +2317,9 @@ public class SharePointRepository extend
     Map<String,Object> velocityContext = new HashMap<String,Object>();
     velocityContext.put("TabName",tabName);
     fillInServerTab(velocityContext,out,parameters);
+    fillInAuthorityTypeTab(velocityContext,out,parameters);
     Messages.outputResourceWithVelocity(out,locale,"editConfiguration_Server.html",velocityContext);
+    Messages.outputResourceWithVelocity(out,locale,"editConfiguration_AuthorityType.html",velocityContext);
   }
   
   
@@ -2336,36 +2339,36 @@ public class SharePointRepository extend
   {
     String serverVersion = variableContext.getParameter("serverVersion");
     if (serverVersion != null)
-      parameters.setParameter("serverVersion",serverVersion);
+      parameters.setParameter(SharePointConfig.PARAM_SERVERVERSION,serverVersion);
 
     String serverProtocol = variableContext.getParameter("serverProtocol");
     if (serverProtocol != null)
-      parameters.setParameter("serverProtocol",serverProtocol);
+      parameters.setParameter(SharePointConfig.PARAM_SERVERPROTOCOL,serverProtocol);
 
     String serverName = variableContext.getParameter("serverName");
 
     if (serverName != null)
-      parameters.setParameter("serverName",serverName);
+      parameters.setParameter(SharePointConfig.PARAM_SERVERNAME,serverName);
 
     String serverPort = variableContext.getParameter("serverPort");
     if (serverPort != null)
-      parameters.setParameter("serverPort",serverPort);
+      parameters.setParameter(SharePointConfig.PARAM_SERVERPORT,serverPort);
 
     String serverLocation = variableContext.getParameter("serverLocation");
     if (serverLocation != null)
-      parameters.setParameter("serverLocation",serverLocation);
+      parameters.setParameter(SharePointConfig.PARAM_SERVERLOCATION,serverLocation);
 
     String userName = variableContext.getParameter("userName");
     if (userName != null)
-      parameters.setParameter("userName",userName);
+      parameters.setParameter(SharePointConfig.PARAM_SERVERUSERNAME,userName);
 
     String password = variableContext.getParameter("password");
     if (password != null)
-      parameters.setObfuscatedParameter("password",variableContext.mapKeyToPassword(password));
+      parameters.setObfuscatedParameter(SharePointConfig.PARAM_SERVERPASSWORD,variableContext.mapKeyToPassword(password));
 
     String keystoreValue = variableContext.getParameter("keystoredata");
     if (keystoreValue != null)
-      parameters.setParameter("keystore",keystoreValue);
+      parameters.setParameter(SharePointConfig.PARAM_SERVERKEYSTORE,keystoreValue);
 
     String configOp = variableContext.getParameter("configop");
     if (configOp != null)
@@ -2373,20 +2376,20 @@ public class SharePointRepository extend
       if (configOp.equals("Delete"))
       {
         String alias = variableContext.getParameter("shpkeystorealias");
-        keystoreValue = parameters.getParameter("keystore");
+        keystoreValue = parameters.getParameter(SharePointConfig.PARAM_SERVERKEYSTORE);
         IKeystoreManager mgr;
         if (keystoreValue != null)
           mgr = KeystoreManagerFactory.make("",keystoreValue);
         else
           mgr = KeystoreManagerFactory.make("");
         mgr.remove(alias);
-        parameters.setParameter("keystore",mgr.getString());
+        parameters.setParameter(SharePointConfig.PARAM_SERVERKEYSTORE,mgr.getString());
       }
       else if (configOp.equals("Add"))
       {
         String alias = IDFactory.make(threadContext);
         byte[] certificateValue = variableContext.getBinaryBytes("shpcertificate");
-        keystoreValue = parameters.getParameter("keystore");
+        keystoreValue = parameters.getParameter(SharePointConfig.PARAM_SERVERKEYSTORE);
         IKeystoreManager mgr;
         if (keystoreValue != null)
           mgr = KeystoreManagerFactory.make("",keystoreValue);
@@ -2419,9 +2422,14 @@ public class SharePointRepository extend
           // Redirect to error page
           return "Illegal certificate: "+certError;
         }
-        parameters.setParameter("keystore",mgr.getString());
+        parameters.setParameter(SharePointConfig.PARAM_SERVERKEYSTORE,mgr.getString());
       }
     }
+    
+    String authorityType = variableContext.getParameter("authorityType");
+    if (authorityType != null)
+      parameters.setParameter(SharePointConfig.PARAM_AUTHORITYTYPE,authorityType);
+
     return null;
   }
   
@@ -2439,43 +2447,54 @@ public class SharePointRepository extend
   {
     Map<String,Object> velocityContext = new HashMap<String,Object>();
     fillInServerTab(velocityContext,out,parameters);
+    fillInAuthorityTypeTab(velocityContext,out,parameters);
     Messages.outputResourceWithVelocity(out,locale,"viewConfiguration.html",velocityContext);
   }
+
+  protected static void fillInAuthorityTypeTab(Map<String,Object> velocityContext,
IHTTPOutput out, ConfigParams parameters)
+    throws ManifoldCFException
+  {
+    // Default to Active Directory, for backwards compatibility
+    String authorityType = parameters.getParameter(SharePointConfig.PARAM_AUTHORITYTYPE);
+    if (authorityType == null)
+      authorityType = "ActiveDirectory";
+    velocityContext.put("AUTHORITYTYPE", authorityType);
+  }
   
   protected static void fillInServerTab(Map<String,Object> velocityContext, IHTTPOutput
out, ConfigParams parameters)
     throws ManifoldCFException
   {
-    String serverVersion = parameters.getParameter("serverVersion");
+    String serverVersion = parameters.getParameter(SharePointConfig.PARAM_SERVERVERSION);
     if (serverVersion == null)
       serverVersion = "2.0";
 
-    String serverProtocol = parameters.getParameter("serverProtocol");
+    String serverProtocol = parameters.getParameter(SharePointConfig.PARAM_SERVERPROTOCOL);
     if (serverProtocol == null)
       serverProtocol = "http";
 
-    String serverName = parameters.getParameter("serverName");
+    String serverName = parameters.getParameter(SharePointConfig.PARAM_SERVERNAME);
     if (serverName == null)
       serverName = "localhost";
 
-    String serverPort = parameters.getParameter("serverPort");
+    String serverPort = parameters.getParameter(SharePointConfig.PARAM_SERVERPORT);
     if (serverPort == null)
       serverPort = "";
 
-    String serverLocation = parameters.getParameter("serverLocation");
+    String serverLocation = parameters.getParameter(SharePointConfig.PARAM_SERVERLOCATION);
     if (serverLocation == null)
       serverLocation = "";
       
-    String userName = parameters.getParameter("userName");
+    String userName = parameters.getParameter(SharePointConfig.PARAM_SERVERUSERNAME);
     if (userName == null)
       userName = "";
 
-    String password = parameters.getObfuscatedParameter("password");
+    String password = parameters.getObfuscatedParameter(SharePointConfig.PARAM_SERVERPASSWORD);
     if (password == null)
       password = "";
     else
       password = out.mapPasswordToKey(password);
 
-    String keystore = parameters.getParameter("keystore");
+    String keystore = parameters.getParameter(SharePointConfig.PARAM_SERVERKEYSTORE);
     IKeystoreManager localKeystore;
     if (keystore == null)
       localKeystore = KeystoreManagerFactory.make("");

Modified: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_en_US.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_en_US.properties?rev=1531529&r1=1531528&r2=1531529&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_en_US.properties
(original)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_en_US.properties
Sat Oct 12 13:10:05 2013
@@ -13,6 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+SharePointRepository.AuthorityTypeColon=Authority type:
+SharePointRepository.SharePoint=SharePoint
+SharePointRepository.ActiveDirectory=Active Directory
+
 SharePointRepository.List=List
 SharePointRepository.AddList=Add List
 SharePointRepository.SelectList=Select list
@@ -26,6 +30,7 @@ SharePointRepository.AddPathMapping=Add 
 SharePointRepository.NoAccessTokensPresent=No access tokens present
 SharePointRepository.NoAccessTokensSpecified=No access tokens specified
 SharePointRepository.Server=Server
+SharePointRepository.AuthorityType=Authority type
 SharePointRepository.Paths=Paths
 SharePointRepository.Security=Security
 SharePointRepository.Metadata=Metadata

Modified: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_ja_JP.properties
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_ja_JP.properties?rev=1531529&r1=1531528&r2=1531529&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_ja_JP.properties
(original)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/native2ascii/org/apache/manifoldcf/crawler/connectors/sharepoint/common_ja_JP.properties
Sat Oct 12 13:10:05 2013
@@ -13,6 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+SharePointRepository.AuthorityTypeColon=Authority type:
+SharePointRepository.SharePoint=SharePoint
+SharePointRepository.ActiveDirectory=Active Directory
+
 SharePointRepository.List=一覧表
 SharePointRepository.AddList=一覧を追加します
 SharePointRepository.SelectList=一覧を選択
@@ -26,6 +30,7 @@ SharePointRepository.AddPathMapping=Add 
 SharePointRepository.NoAccessTokensPresent=アクセストークンが存在しません
 SharePointRepository.NoAccessTokensSpecified=アクセストークンが未定義です
 SharePointRepository.Server=サーバ
+SharePointRepository.AuthorityType=Authority type
 SharePointRepository.Paths=パス
 SharePointRepository.Security=セキュリティ
 SharePointRepository.Metadata=メタデータ

Modified: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/sharepoint/editConfiguration_Server.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/sharepoint/editConfiguration_Server.html?rev=1531529&r1=1531528&r2=1531529&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/sharepoint/editConfiguration_Server.html
(original)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/sharepoint/editConfiguration_Server.html
Sat Oct 12 13:10:05 2013
@@ -22,6 +22,7 @@
 #if($TabName == $ResourceBundle.getString('SharePointAuthority.Server'))
 
 <table class="displaytable">
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
   <tr>
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointAuthority.ServerSharePointVersion'))</nobr></td>
     <td class="value">

Added: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_AuthorityType.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_AuthorityType.html?rev=1531529&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_AuthorityType.html
(added)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_AuthorityType.html
Sat Oct 12 13:10:05 2013
@@ -0,0 +1,43 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+#if($TabName == $ResourceBundle.getString('SharePointRepository.AuthorityType'))
+
+<table class="displaytable">
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.AuthorityTypeColon'))</nobr></td>
+    <td class="value">
+  #if($AUTHORITYTYPE == 'SharePoint')
+      <input type="radio" name="authorityType" value="SharePoint" checked="true"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SharePoint'))</nobr></input>
+  #else
+      <input type="radio" name="authorityType" value="SharePoint"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SharePoint'))</nobr></input>
+  #end
+  #if($AUTHORITYTYPE == 'ActiveDirectory')
+      <input type="radio" name="authorityType" value="ActiveDirectory" checked="true"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.ActiveDirectory'))</nobr></input>
+  #else
+      <input type="radio" name="authorityType" value="ActiveDirectory"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.ActiveDirectory'))</nobr></input>
+  #end
+    </td>
+  </tr>
+</table>
+
+#else
+
+<input type="hidden" name="authorityType" value="$AUTHORITYTYPE"/>
+
+#end

Propchange: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_AuthorityType.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_AuthorityType.html
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_Server.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_Server.html?rev=1531529&r1=1531528&r2=1531529&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_Server.html
(original)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/editConfiguration_Server.html
Sat Oct 12 13:10:05 2013
@@ -22,6 +22,7 @@
 #if($TabName == $ResourceBundle.getString('SharePointRepository.Server'))
 
 <table class="displaytable">
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
   <tr>
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.ServerSharePointVersion'))</nobr></td>
     <td class="value">

Modified: manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/viewConfiguration.html
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/viewConfiguration.html?rev=1531529&r1=1531528&r2=1531529&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/viewConfiguration.html
(original)
+++ manifoldcf/branches/CONNECTORS-754/connectors/sharepoint/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/sharepoint/viewConfiguration.html
Sat Oct 12 13:10:05 2013
@@ -19,15 +19,15 @@
   <tr>
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.ServerSharePointVersion'))</nobr></td>
     <td class="value">
-  #if($SERVERVERSION == '2.0')
+#if($SERVERVERSION == '2.0')
         SharePoint Services 2.0 (2003)
-  #elseif($SERVERVERSION == '3.0')
+#elseif($SERVERVERSION == '3.0')
         SharePoint Services 3.0 (2007)
-  #elseif($SERVERVERSION == '4.0')
+#elseif($SERVERVERSION == '4.0')
         SharePoint Services 4.0 (2010)
-  #else
+#else
         Unknown
-  #end
+#end
     </td>
   </tr>
   <tr>
@@ -70,18 +70,33 @@
     <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SSLCertificateList'))</nobr></td>
     <td class="value">
       <table class="displaytable">
-  #if($CERTIFICATELIST.size() == 0)
+#if($CERTIFICATELIST.size() == 0)
         <tr><td class="message" colspan="1">$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.NoCertificatesPresent'))</td></tr>
-  #else
-    #foreach($certificate in $CERTIFICATELIST)
+#else
+  #foreach($certificate in $CERTIFICATELIST)
         <tr>
           <td class="value">
             $Encoder.bodyEscape($certificate.get('DESCRIPTION'))
           </td>
         </tr>
-    #end
   #end
+#end
       </table>
     </td>
   </tr>
+  
+  <tr><td class="separator" colspan="2"><hr/></td></tr>
+
+  <tr>
+    <td class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.AuthorityTypeColon'))</nobr></td>
+    <td class="value">
+#if($AUTHORITYTYPE == 'SharePoint')
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.SharePoint'))</nobr>
+#elseif($AUTHORITYTYPE == 'ActiveDirectory')
+      <nobr>$Encoder.bodyEscape($ResourceBundle.getString('SharePointRepository.ActiveDirectory'))</nobr>
+#else
+      Unknown
+#end
+    </td>
+  </tr>
 </table>



Mime
View raw message