You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2013/06/25 02:55:49 UTC

svn commit: r1496319 - /manifoldcf/branches/CONNECTORS-703/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorities/BaseAuthorityConnector.java

Author: kwright
Date: Tue Jun 25 00:55:48 2013
New Revision: 1496319

URL: http://svn.apache.org/r1496319
Log:
Accept also a form where only the username is present.

Modified:
    manifoldcf/branches/CONNECTORS-703/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorities/BaseAuthorityConnector.java

Modified: manifoldcf/branches/CONNECTORS-703/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorities/BaseAuthorityConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-703/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorities/BaseAuthorityConnector.java?rev=1496319&r1=1496318&r2=1496319&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-703/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorities/BaseAuthorityConnector.java (original)
+++ manifoldcf/branches/CONNECTORS-703/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authorities/BaseAuthorityConnector.java Tue Jun 25 00:55:48 2013
@@ -48,7 +48,14 @@ public abstract class BaseAuthorityConne
     throws ManifoldCFException
   {
     UserRecord activeDirectoryDomain = userRecord.getDomainValueAsUserRecord(UserRecord.DOMAIN_ACTIVEDIRECTORY);
-    if (activeDirectoryDomain == null || activeDirectoryDomain.getDomainCount() == 0)
+    if (activeDirectoryDomain == null)
+    {
+      String activeDirectoryUser = userRecord.getDomainValueAsString(UserRecord.DOMAIN_ACTIVEDIRECTORY);
+      if (activeDirectoryUser == null)
+        return new AuthorizationResponse(new String[0],AuthorizationResponse.RESPONSE_USERNOTFOUND);
+      return getAuthorizationResponse(activeDirectoryUser);
+    }
+    if (activeDirectoryDomain.getDomainCount() == 0)
       return new AuthorizationResponse(new String[0],AuthorizationResponse.RESPONSE_USERNOTFOUND);
     Iterator<String> adDomains = activeDirectoryDomain.iteratorDomains();
     // Just pick the first one