-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Role assignment based on ldap attribute #112
Comments
Hi there. That's possible. You'd want to use a group-filter like That way your group-attribute will be used to select the roles. Is that what you had in mind? |
Hi, Thanks a lot for getting back to me! We just had a week-long server downtime due to some upgrades, so I was able to try it out only now. The problem I have with this setting is that when I set and I set no value for any Role-group mapping, the login works fine, but of course no mapping happens. But whenever I set any value to match for any role (whether it is something that I actually expect in the attribute or some nonsense string), I get stuck on the login screen (ie browser waiting for the site to respond after I click Login). I'll check the logs (I ask the server admin to give me access), but is there anything else I should be aware of with this setting? Best Ondrej |
Hei Ondrei. I'm currently not sure whether you should use a lowercase version of the attribute name. But appart from that it should work... I'd be glad to hear what the server log says! |
Wow, fastest support reply ever :) |
Strange. I need to get to my laptop to check that further (which won't be until tonight). I'll be back on that! |
OK, I got the access to the log file and with its help I got it working. My colleague was initially setting up the plugin and I haven't noticed that he set the Filter under General Filter Settings (quite correctly) to Or actually, two more hiccups - the attribute value I was after includes some non-ascii characters, which interestingly disappear when I load them e.g. into the email field in WP, but need to be there for Group Matching. Which made me thinking, it might be quite useful to have some pattern matching (regex) there so that you could only enter part of the group/attribute value. After that all worked smoothly, though an error pops up in the log: [Sun Aug 28 01:36:30 2016] [error] [client x.x.x.x.x] Chyba datab\xc3\xa1ze WordPressu: Duplicate entry '2-16' for key 1. Konkr\xc3\xa9tn\xc3\xad dotaz: INSERT INTO Parts of the error are unfortunately Czech, "Chyba datab\xc3\xa1ze WordPressu" means "WP Database Error", "Konkr\xc3\xa9tn\xc3\xad dotaz" means "Specific query" and "P\xc5\x99\xc3\xadslu\xc5\xa1n\xc3\xa1 funkce" means "Requested function". Could this be because we have a multisite configuration? In any case, thanks a lot for your help and for the plugin! |
Sorry for not getting back earlier. I'll have a look at that later today… |
Hi,
Our ldap stores departmental affiliation in an attribute, not via groups. Would it be possible to match WP groups based on such a ldap attribute(s)?
Best
Ondrej
The text was updated successfully, but these errors were encountered: