Skip to content
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

Add option to automatically add LDAP users to a group #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neilmcgovern
Copy link

This should add the ability to add users to groups automatically when they authenticate via LDAP.

It's a really simple patch (almost too simple...), so may need testing further than my cursory efforts.

@jonmbake
Copy link
Owner

I don't think there is a good use case for this. If you want to add a static list of groups to all users, you could do it via a script or through the admin console. I think what most people want is to add Discourse groups based on ldap user groups.

@neilmcgovern
Copy link
Author

Well, it's not for all users 🙂

As an example, we want to add people to a certain group (say, staff) if they log in via LDAP, rather than any of the social or email logins. An example would be where staff users have LDAP logins, but interact with the wider community on Discourse.

It seems that the only way of adding people to groups at the moment is when the plugin runs in list mode, which doesn't really help if you're trying to make ldap the single point of truth and not have to re-export the contents of the LDAP database into another file.

I could see how we could do that if the plugin fetches groups from LDAP dynamically, though in the use case above, we'd only want some LDAP groups to match against some Discourse groups. Would you welcome a patch for that, and if so, any thoughts on how to do that mapping in the interface?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants