Skip to content

Recursive memberOf group search strategy #66

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

Closed
wants to merge 6 commits into from
Closed

Conversation

mtodd
Copy link
Member

@mtodd mtodd commented Nov 29, 2014

This is a companion to the recursive member search strategy introduced in #64 which searches for the groups an entry is a member of.

There isn't really a classic strategy here other than to just search for the direct memberships without recursing to find subgroups the entry is a member of.

Going to follow up after this is merged to clean up and bring this and #64 functionality into a more consistent interface.

cc @jch @github/ldap

@mtodd mtodd self-assigned this Nov 29, 2014

entries.each_with_object(entries.dup) do |entry, entries|
entries.concat search_strategy.perform(entry)
end.select { |entry| group?(entry) }
Copy link
Member Author

Choose a reason for hiding this comment

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

This looks pretty innocuous, but it can result in N_M *recursive_ queries and exceptionally bad performance for large data sets.

It might make more sense to inline the relevant logic from the search strategy in order to recursively search for multiple entries at a given time (instead of individually). This warrants more consideration and testing.

@mtodd
Copy link
Member Author

mtodd commented Dec 3, 2014

This won't be making it into the imminent release, 1.6.0.

@mtodd
Copy link
Member Author

mtodd commented Aug 5, 2016

Closing as stale.

@mtodd mtodd closed this Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant