registration-enabled is not reflected in the UI #1264

Closed
opened 2026-02-05 00:26:24 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @guidopatanella on GitHub (Jul 18, 2019).

Originally assigned to: @ssddanbrown on GitHub.

Describe the bug
When the settings.registration_enabled is set to true, it is shown as false in the UI, therefore when saving the settings page through the UI the value is then set to false even if unchaged.

Steps To Reproduce
Steps to reproduce the behavior:

  1. set registration_enabled to true in the settings UI
  2. navigate to another page
  3. return to settings, notice it is set to false (unchecked

Expected behavior
UI should reflect the database value

Originally created by @guidopatanella on GitHub (Jul 18, 2019). Originally assigned to: @ssddanbrown on GitHub. **Describe the bug** When the settings.registration_enabled is set to true, it is shown as false in the UI, therefore when saving the settings page through the UI the value is then set to false even if unchaged. **Steps To Reproduce** Steps to reproduce the behavior: 1. set registration_enabled to true in the settings UI 2. navigate to another page 3. return to settings, notice it is set to false (unchecked **Expected behavior** UI should reflect the database value
OVERLORD added the 🐛 Bug🚪 Authentication🏭 Back-End labels 2026-02-05 00:26:24 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Aug 14, 2019):

Hi @guidopatanella,

Sorry for my late reply, I've just tried to test this out and have been unable to reproduce this issue.
Just to confirm, Are you clicking the save button below the option or the save button for the section above?

@ssddanbrown commented on GitHub (Aug 14, 2019): Hi @guidopatanella, Sorry for my late reply, I've just tried to test this out and have been unable to reproduce this issue. Just to confirm, Are you clicking the save button below the option or the save button for the section above?
Author
Owner

@fur2 commented on GitHub (Dec 10, 2019):

Hi @guidopatanella,

Sorry for my late reply, I've just tried to test this out and have been unable to reproduce this issue.
Just to confirm, Are you clicking the save button below the option or the save button for the section above?

look like this https://sm.ms/image/fEI8YywhktOFWPg

@fur2 commented on GitHub (Dec 10, 2019): > Hi @guidopatanella, > > Sorry for my late reply, I've just tried to test this out and have been unable to reproduce this issue. > Just to confirm, Are you clicking the save button below the option or the save button for the section above? look like this https://sm.ms/image/fEI8YywhktOFWPg
Author
Owner

@gramakri commented on GitHub (Dec 11, 2019):

I was able to reproduce this with the Cloudron package. It seems that when LDAP is enabled, the registration enabled flag is ignored. And that indeed seems to be the case from the code at https://github.com/BookStackApp/BookStack/blob/master/app/Settings/SettingService.php#L269

Any reason why it's ignored in code like that?

@gramakri commented on GitHub (Dec 11, 2019): I was able to reproduce this with the Cloudron package. It seems that when LDAP is enabled, the registration enabled flag is ignored. And that indeed seems to be the case from the code at https://github.com/BookStackApp/BookStack/blob/master/app/Settings/SettingService.php#L269 Any reason why it's ignored in code like that?
Author
Owner

@ssddanbrown commented on GitHub (Dec 12, 2019):

Ah, Yeah, Good find @gramakri. And thanks for the evidence of this occurring @fur2.

When LDAP is enabled then registration is inherently enabled but the default registration routes and views are not used (Which are controlled via this option). BookStack will permit access based on LDAP system auth success, then login the visitor as a BookStack user if they exist in the DB, otherwise auto-create them and then log them in as that "new user", to provide a smooth sign-up experience. In other words, The LDAP system decides who can be "registered" instead of BookStack providing visitors with the option to register themselves.

I've assigned this to the next release to address, Probably will be a case of clearly showing that option as disabled (Yet maybe ticked) and adding some info to explain why it can't be changed while LDAP is enabled.

@ssddanbrown commented on GitHub (Dec 12, 2019): Ah, Yeah, Good find @gramakri. And thanks for the evidence of this occurring @fur2. When LDAP is enabled then registration is inherently enabled but the default registration routes and views are not used (Which are controlled via this option). BookStack will permit access based on LDAP system auth success, then login the visitor as a BookStack user if they exist in the DB, otherwise auto-create them and then log them in as that "new user", to provide a smooth sign-up experience. In other words, The LDAP system decides who can be "registered" instead of BookStack providing visitors with the option to register themselves. I've assigned this to the next release to address, Probably will be a case of clearly showing that option as disabled (Yet maybe ticked) and adding some info to explain why it can't be changed while LDAP is enabled.
Author
Owner

@ssddanbrown commented on GitHub (Dec 22, 2019):

I've just committed e06f9f7fe3 to master which stops the confusing behaviour of the chosen option not being reflected while adding a warning to advise that the setting is not used while LDAP is in use due to functional differences in authentication systems.

This will be part of the next release ,v0.28, due out at the end of the year.

@ssddanbrown commented on GitHub (Dec 22, 2019): I've just committed e06f9f7fe3af9a0218b6530c4ebe3fef1c7925f6 to `master` which stops the confusing behaviour of the chosen option not being reflected while adding a warning to advise that the setting is not used while LDAP is in use due to functional differences in authentication systems. This will be part of the next release ,v0.28, due out at the end of the year.
Author
Owner

@gramakri commented on GitHub (Dec 23, 2019):

Awesome. Will be happy to test it out when the next release is out

@gramakri commented on GitHub (Dec 23, 2019): Awesome. Will be happy to test it out when the next release is out
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1264