A user can belong to many different groups on LDAP. In my system I need each LDAP group to map to multiple Drupal roles. However, this version of LDAP groups only maps the first LDAP group to a single role and stops there, only giving the user one role upon initial login.

For instance, I put into "Mapping of LDAP groups to Drupal roles:"

cn=usergroup,ou=personnel,dc=dir,dc=example,dc=com|general user
cn=usergroup, ou=personnel,dc=dir,dc=example,dc=com|author
cn=usergroup,ou=personnel, dc=dir,dc=example,dc=com|reviewer
cn=usergroup,ou=personnel,dc=dir, dc=example,dc=com|approver
cn=anotherusergroup,ou=personnel,dc=dir,dc=example,dc=com|general user
cn=anotherusergroup, ou=personnel,dc=dir,dc=example,dc=com|another author
...

Note* I put spaces after some commas in there. If I didn't then LDAP would drop the lines with identical group dn's.

So I'm expecting to login (in LDAP I'm in the usergroup) and receive "general user," "author," "reviewer," and "approver" as my roles, but as it stands right now I'm only getting "general user."

Is this by design or am I doing something wrong?

Comments

Daeluin’s picture

I have the same problem, good to know about the spaces trick.

escsco’s picture

Yeah, but it didn't really solve anything other than the capability of saving them.

johnbarclay’s picture

cgmonroe’s picture

Clearing out old support requests - Changing this to a feature request.

cgmonroe’s picture

Category: support » feature

Sigh, would help if I really did it...

cgmonroe’s picture

Version: 6.x-1.0-beta2 » 6.x-1.x-dev
Status: Active » Fixed

The latest -dev version now allows group mapping rules using the syntax:

[ldap group]|[Drupal role], [Drupal role]...

For details see: #1475272: 6.x-1.0 Release Candidate 1 Status

Status: Fixed » Closed (fixed)

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