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.

CommentFileSizeAuthor
ldapgroups.module.patch561 bytesptaff

Comments

miglius’s picture

Issue tags: +ldapgroups

Please create a patch against the dev version instead of the alpha2. The code has changed significantly since then.

miglius’s picture

Status: Needs review » Needs work
cgmonroe’s picture

Version: 6.x-1.0-alpha2 » 6.x-1.x-dev
Status: Needs work » Fixed

The 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

Status: Fixed » Closed (fixed)
Issue tags: -multisite, -ldapgroups

Automatically closed -- issue fixed for 2 weeks with no activity.