I work with a multisite Drupal setup.
I use a LDAP tree, with users all in the same organizationalUnit and one organizationalUnit per website (each with groupOfNames entries mapped to Drupal Roles); that way, I can mix-n-match users and roles for each site.
As I'd rather share the ldapauth database table amongst sites, I patched ldapgroups.module so that the ldapgroup_entries field parses PHP expressions; that way I can dynamically determine where to look for to get group membership.
Should you apply this patch, it might be relevant to resize the ldapgroups_entries database column (currently VARCHAR(255)) to accomodate larger code.
Note that this patch is unobtrusive: old syntax still works without modification.
| Comment | File | Size | Author |
|---|---|---|---|
| ldapgroups.module.patch | 561 bytes | ptaff |
Comments
Comment #1
miglius commentedPlease create a patch against the dev version instead of the alpha2. The code has changed significantly since then.
Comment #2
miglius commentedComment #3
cgmonroe commentedThe latest -dev version contains a lot of features that should do the same thing as this. You can now define Group Access Rules to allow and deny combinations of people in groups. If that isn't enough there are a bunch of new hooks that can be used to support this via some 3rd party module code.
For details see: #1475272: 6.x-1.0 Release Candidate 1 Status