LDAP "array" attributes

Skip to first unread message

Richard Vowles

Oct 22, 2014, 10:49:27 PM10/22/14
to scrip...@googlegroups.com
The code in the driver for the LDAP connector only returns the first element in the array (e.g. group -> member - multiple members, but only picks up the first one).

Since we then pass it onto a Groovy script we can change it to check the size and return a getAll() so there is an enumeration returned, however that doesn't appear to fit with the architecture of Scriptella so would there be a better recommendation?

We'd like to pass the code back via  a pull request.


Fyodor Kupolov

Oct 29, 2014, 1:02:22 AM10/29/14
to scrip...@googlegroups.com
Hi Richard,

I can think of two options. First, is expose a variable, lets say "searchResult", which will point to the current SearchResult (complete row).

Another option, as you mentioned, the behavior can be changed to return enumeration (preferably Collection or List), for cases when an attribute has multiple values. I don't think that the current behavior of returning an arbitrary element is really useful. I will be glad to accept your changes!


Fyodor Kupolov

Oct 29, 2014, 1:13:39 AM10/29/14
to scrip...@googlegroups.com
One clarification for option #2. In order not to break clients, who don't use attributes with multiple value (most likely scenario in my opinion), I would like to keep the existing behavior for cases with one element or null, and only return Collection for 2 or more elements.
Reply all
Reply to author
0 new messages