Repository navigation
Fix portal setting that handles Require a valid Profile for Login toggle - #7590
Open
idumlupinar wants to merge 1 commit into
Open
idumlupinar wants to merge 1 commit into
idumlupinar wants to merge 1 commit into
Conversation
… wrong settings key
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7586
Reported by @bennysu
Summary
In the Persona Bar, Settings → Security → Basic Login Settings → "Require a valid Profile for Login" cannot be turned off. You switch it off, click Save, and get a success message. When the page reloads, the toggle is back on, and sign-in still sends users with an incomplete profile to the "Please update your profile" form.
The cause is a mismatched settings key. The save endpoint writes the value to Security_RequireValidProfile, which is the registration setting. The screen and the sign-in check both read Security_RequireValidProfileAtLogin, and that key defaults to on.
There is a second effect: saving the Login settings also overwrites the "Require a valid profile" setting on the Registration settings screen. An admin who requires a valid profile at registration loses that setting the next time anyone saves the Login settings with this toggle off.
Testing
Go to Settings → Site Settings → Site Behavior → User Profiles, and mark at least one profile property as Required (for example Region).
Create a regular user and leave that property empty.
Go to Settings → Security → Basic Login Settings, switch Require a valid Profile for Login off, and click Save. A success message appears.
Reload the page.
Expected/Actual: the toggle is on.