Mazwak / active_directory

Native Ruby Access to Microsoft Active Directory
http://rubyforge.org/projects/activedirectory
GNU General Public License v3.0
16 stars 18 forks source link

ability to select what attributes to return in Base find methods #10

Open nextgenappsllc opened 7 years ago

nextgenappsllc commented 7 years ago

I am populating select fields in html forms with users from active directory. The problem is that all I need is the dn, username and/or cn while the search method was returning all the attributes including group names and thumbnail data etc.

I changed the find methods to allow for the passing of an array of attributes for this purpose. The only portion that I think this might adversely effect is caching possibly with cases where caching occurs for a query with selected attributes and then you run a query for all attributes and it returns a cache with those missing but I haven't looked to much at that code. Let me know if it does and I'll make the required changes to caching to accommodate that.

Otherwise, if you want to pull, I can add the changes to the documentation.

Thanks, and great work with this by the way!