manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1099203 - /incubator/lcf/branches/CONNECTORS-195/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
Date Tue, 03 May 2011 19:09:50 GMT
Author: kwright
Date: Tue May  3 19:09:50 2011
New Revision: 1099203

URL: http://svn.apache.org/viewvc?rev=1099203&view=rev
Log:
Key off of zero sids, not zero results

Modified:
    incubator/lcf/branches/CONNECTORS-195/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java

Modified: incubator/lcf/branches/CONNECTORS-195/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-195/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java?rev=1099203&r1=1099202&r2=1099203&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-195/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
(original)
+++ incubator/lcf/branches/CONNECTORS-195/connectors/activedirectory/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/activedirectory/ActiveDirectoryAuthority.java
Tue May  3 19:09:50 2011
@@ -225,12 +225,8 @@ public class ActiveDirectoryAuthority ex
     {
       //Search for tokens.  Since every user *must* have a SID, the no user detection should
be safe.
       NamingEnumeration answer = ctx.search(searchBase, searchFilter, searchCtls);
-      if (!answer.hasMoreElements())
-        return userNotFoundResponse;
 
       ArrayList theGroups = new ArrayList();
-      // All users get certain well-known groups
-      theGroups.add("S-1-1-0");
 
       //Loop through the search results
       while (answer.hasMoreElements())
@@ -261,7 +257,13 @@ public class ActiveDirectoryAuthority ex
 				
         }
       }
+
+      if (theGroups.size() == 0)
+        return userNotFoundResponse;
       
+      // All users get certain well-known groups
+      theGroups.add("S-1-1-0");
+
       String[] tokens = new String[theGroups.size()];
       int k = 0;
       while (k < tokens.length)



Mime
View raw message