Skip to content

Subgroup Member Search strategy optimizations #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 20, 2015
Merged

Conversation

mtodd
Copy link
Member

@mtodd mtodd commented Jan 15, 2015

Refactors the Recursive Member Search strategy to search for subgroups and then materialize members (without search).

This still performs a search for every member, but filters for group objects only. Once all of the groups have been identified (respecting the max depth option), we take the subgroups' members and materialize them into Net::LDAP::Entry objects (just wrapping the dn).

cc @jch

return entries_by_uid(uids) if uids.any?

# track group
searched << group.dn
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I can tell, searched tracks DNs for groups, members, and subgroups. Maybe a better explanation or variable name here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jch
Copy link
Contributor

jch commented Jan 16, 2015

What's attrs in find_groups_by_dn? Looks like you extracted and forgot to carry that over?

@jch
Copy link
Contributor

jch commented Jan 16, 2015

I didn't try running this, but I'm guessing there's test coverage on the existing behavior?

@mtodd
Copy link
Member Author

mtodd commented Jan 16, 2015

@jch attrs is an attr_accessor that gets initialized on instantiation.

@jch yeah, the existing test coverage is what matters here.

mtodd added a commit that referenced this pull request Jan 20, 2015
Subgroup Member Search strategy optimizations
@mtodd mtodd merged commit db977d3 into master Jan 20, 2015
@mtodd mtodd deleted the subgroup-member-search branch January 20, 2015 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants