Sometimes you need to limit access to a Drupal instance to a single group in LDAP. Drupal has LDAP authentication module which works great. However, there is no way of setting group based access via its web interface.
The solution is to adjust ldapauth_user_filter function in sites/all/modules/ldap_integration/ldap_integration/ldapauth.conf.php. In order to allow users from "drupal_access" group only, change it to something similar to this:
function ldapauth_user_filter(&$attributes) {
if ($attributes['memberof'][0] == "CN=drupal_access,CN=Users,DC=domain,DC=local")
return TRUE;
else
return FALSE;
}
Wednesday, December 24, 2008
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment