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

Override invite only with LDAP login #57

Open
ziima opened this issue Dec 8, 2020 · 2 comments
Open

Override invite only with LDAP login #57

ziima opened this issue Dec 8, 2020 · 2 comments

Comments

@ziima
Copy link

ziima commented Dec 8, 2020

I setup a Discourse server on Yunohost and I'd like only a Yunohost (LDAP) users to login. I would like to set Discourse to "invite only" mode to disable public registration (and the "Registration" button) itself, but I'd like users to be created using LDAP. Would it be possible to override "invite only" setting for LDAP users?

@jonmbake
Copy link
Owner

jonmbake commented Dec 9, 2020

I am not super familar with Discourse's "invite only" mode. It seems like it is set at the user group level. Is that correct?

The plugin does allow specify user groups on a per-user basis when using the list user account creation mode, e.g.:

- :name: Example User
  :email: [email protected]
  :username: example_user
  :groups: ['Discourse Invite Only Group']

It sounds like this doesn't meet your use case since this has to be declared on a per-user basis, and you want this behavior for all LDAP users created w/ the auto user creation mode. The plugin currently doesn't allow this, but we could easily add a plugin config to allow declaring a default user group for all LDAP users by udpating this bit of the plugin code: https://github.com/jonmbake/discourse-ldap-auth/blob/master/lib/ldap_user.rb#L9.

@ziima
Copy link
Author

ziima commented Dec 11, 2020

"invite only" is part of a Login section settings. I'm not very familiar with Discourse, but I haven't found any other solution.

To the proposed fix: indeed, I'd like all user from LDAP to be created, so a change that would allow this would be welcome.

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

No branches or pull requests

2 participants