discourse_ynh
discourse_ynh copied to clipboard
LDAP plugin doesn't create new users
Describe the bug
LDAP plugin fails to create new discourse users. Login to existing users works correctly.
Context
- Hardware: VPS
- YunoHost version: 11.1.13
- I have access to my server: Through SSH | through the webadmin
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?:
- We only allow access to Discourse through LDAP login.
- I needed to fix access for the admin account to the LDAP after Yunohost 11 to keep it working properly.
- Current package version:
- discourse 2.8.13
- discourse-ldap-auth 0.6.0
Steps to reproduce
-
If you performed a command from the CLI, the command itself is enough. For example:
sudo yunohost app install the_app - If you used the webadmin, please perform the equivalent command from the CLI first.
-
If the error occurs in your browser, explain what you did:
- Go to
https://discourse.example.org/auth/ldap. - Enter credentials for a Yunohost user without an account in Discourse.
- See
auth/ldappage again without any error. - In administration, it can be seen user account wasn't created.
- Go to
Expected behavior
Discourse user should have been created and user logged in.
Logs
No error in logs.
Other details
I found a possible bug in discourse-ldap-auth https://github.com/jonmbake/discourse-ldap-auth/issues/74 but it may not be the only issue. It used to work and it's not clear to me what changed. Apparently user's groups are not provided by LDAP to the plugin which triggers the weird behavior.