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
Comment #1
Daeluin commentedI have the same problem, good to know about the spaces trick.
Comment #2
escsco commentedYeah, but it didn't really solve anything other than the capability of saving them.
Comment #3
johnbarclay commentedI add this to the ldap project d7 (http://drupal.org/project/ldap) issue queue also #968584: Map Multiple Drupal Roles to Multiple LDAP Groups.
Comment #4
cgmonroe commentedClearing out old support requests - Changing this to a feature request.
Comment #5
cgmonroe commentedSigh, would help if I really did it...
Comment #6
cgmonroe commentedThe 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