incubator-connectors-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1099144&view=rev
Log:
Use existence of ObjectSid attribute to decide if user exists

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=1099144&r1=1099143&r2=1099144&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 17:28:27 2011
@@ -211,15 +211,6 @@ public class ActiveDirectoryAuthority ex
     //Specify the Base for the search
     String searchBase = parseUser(userName);
 
-    //Create the search controls for finding the user
-    SearchControls userSearchCtls = new SearchControls();
-
-    //Specify the search scope, must be base level search for users
-    //userSearchCtls.setSearchScope(SearchControls.OBJECT_SCOPE);
-
-    //Specify the attributes to return
-    userSearchCtls.setReturningAttributes(new String[]{"sAMAccountName"});
-
     //Create the search controls for finding the access tokens	
     SearchControls searchCtls = new SearchControls();
 
@@ -231,13 +222,10 @@ public class ActiveDirectoryAuthority ex
 
     try
     {
-      // Search for users
-      NamingEnumeration answer = ctx.search(searchBase, searchFilter, userSearchCtls);
+      //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;
-      
-      //Search for tokens
-      answer = ctx.search(searchBase, searchFilter, searchCtls);
 
       ArrayList theGroups = new ArrayList();
       // All users get certain well-known groups



Mime
View raw message