Posted by ccw on November 9, 2009 at 3:11pm
| Project: | LDAP integration |
| Version: | 6.x-1.0-beta2 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
| Issue tags: | hooks, ldapgroups |
Issue Summary
I've written a patch that introduces a posibility for arbitrary ldap group
detection.
Our particular ldap setup couldn't be catered by the existing 3 strategies so
I implemented a 4th strategy: hook_detect_ldapgroups($ldap_connection, $user)
It enables anyone to write a custom module that implements the hook to cater
any weird scheme for detecting extra groups from LDAP.
I suspect it needs review, but it's a very simple patch with no side-effects,
so I hope it will be included in future releases.
| Attachment | Size |
|---|---|
| hook_detect_ldapgroups.patch | 1.4 KB |
Comments
#1
#2
Unassigning. Someone else should review this.
#3
Ported to Drupal 6.x.
The 1st patch attached was for Drupal 5.x.
#4
Fix some minor style issues in the previous patch.
Moved the example implementation of the hook to ldapgroups.api.php
This leaves just 3 lines of active code changed in the patch... Shouldn't be to hard to review.
#5
In ldap authorization for D7, the hook may look like this:
hook_ldap_authorization_maps_alter(&$user, &$user_ldap_entry, &$ldap_server, &$ldap_authz_map_config, &$authz_ids)
this will allow the modules implementing the hook to:
- have $user, $user_ldap_entry, $ladap_server, and $ldap authorization configuration to work with
- affect mappings from other authorization modules ($authz_ids).
See #807432: LDAP Authorization: Groups only allows single level OU in users's DN (does not allow multiple level OU)