Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding docs/tests around new ldap_check_group_membership_without_admin
Removed a couple extraneous internal functions to slim down the logic from the initial PR. Also, removed the user_in_ldap_group? Devise model method that was implied but not fully added in the PR. If we have a static option, it seems redundant. The only thing the extra model method would accomplish would be to allow model users to specify whether to use the admin LDAP binding to check group membership in the explicit lookup function (the static config is used for the auto group checking during the required groups login flow). This seems like a pretty extraordinary case of an app; namely, it seems like the only case you'd ever want to check group membership with non-admin credentials would be if you can't get or don't want to use admin credentials. I can't think of a plausible use case where you'd have the credentials and would benefit from an admin check later on where you wouldn't just want to use those admin credentials globally (and thus leave the new option at its default false).
- Loading branch information
Showing
5 changed files
with
44 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters