This repository was archived by the owner on Nov 12, 2023. It is now read-only.
[SE-1199] Fix username hints for SSO - #7
Closed
pkulkark wants to merge 2 commits into
Closed
Conversation
pomegranited
suggested changes
Jun 24, 2019
pomegranited
left a comment
There was a problem hiding this comment.
Excellent work finding this clean fix, @pkulkark ! Since we do need to upstream this, I've made a suggestion which I think will make that more doable, and so we'll need a test added to test_settings to cover it.
But it works perfectly, so will approve once that's in and working.
Thank you!
| django_settings.SOCIAL_AUTH_AZUREAD_OAUTH2_AUTH_EXTRA_ARGUMENTS = _SOCIAL_AUTH_AZUREAD_OAUTH2_AUTH_EXTRA_ARGUMENTS | ||
|
|
||
| # Avoid default username check to allow non-ascii characters | ||
| django_settings.SOCIAL_AUTH_CLEAN_USERNAMES = False |
There was a problem hiding this comment.
To make this upstreamable, I suggest linking this setting to the existing settings.FEATURES['ENABLE_UNICODE_USERNAME'] which we already have enabled on Campus's servers. e.g.
django_settings.SOCIAL_AUTH_CLEAN_USERNAMES = not settings.FEATURES.get("ENABLE_UNICODE_USERNAME")
Author
|
@pomegranited Thanks a lot! I didn't know about that feature. I've made the required changes. Let me know if i've missed anything. |
pkulkark
changed the base branch from
master
to
opencraft-release/ginkgo.2-campus
June 25, 2019 02:17
pkulkark
changed the base branch from
opencraft-release/ginkgo.2-campus
to
master
June 25, 2019 02:18
Author
|
Closing this in favor of #8 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR fixes the issue of the username hints not working for SSO - Google, FB, SAML.
The fix essentially disables calling the default clean username method which filters out non-ascii characters.
Testing Instructions:
Reviewers:
@pomegranited