tags:

views:

92

answers:

1

I'm thinking no, but hope to be corrected.

http://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol

i.e. i'm simply looking to a batch read of ~1000 users via one query, instead of making ~1000 separate queries.

Update: Okay, it helps to read the spec: http://tools.ietf.org/html/rfc2254

: )

+3  A: 

Why batch?

(|(cn=user1)(cn=user2)(cn=user3)(cn=user4)(cn=user5)(cn=user6))

The LDAP filter string length can be looked at as unlimited for nearly all practical purposes.

Tomalak
sweet, didn't know that. thanks!
Aaron F.
Maybe you can specify a bit more what you're after? :)
Tomalak
I'm ultimately trying to do a query that starts from a given employee, then walks up their management change, stopping based on an employee's grade level (and returning that high-level manager). There's probably no way to do that within a single query, though.
Aaron F.
Okay, it helps to read the spec: : ) http://tools.ietf.org/html/rfc2254
Aaron F.
Pay attention to the filter escaping rules in section 4! Don't put in any unescaped values when building your filter string.
Tomalak
If you are walking the the manager hierarchy, my answer to a question asked much earlier (http://stackoverflow.com/questions/190516) may be of value to you. It's not ruby, but the general approach is probably useful all the same.
Tomalak