Skip to content
This repository was archived by the owner on Nov 12, 2023. It is now read-only.

[SE-1199] Fix username hints for SSO - #8

Merged
pkulkark merged 3 commits into
opencraft-release/ginkgo.2-campusfrom
pooja/gingko-fix-username-hints-with-SSO
Jun 25, 2019
Merged

[SE-1199] Fix username hints for SSO#8
pkulkark merged 3 commits into
opencraft-release/ginkgo.2-campusfrom
pooja/gingko-fix-username-hints-with-SSO

Conversation

@pkulkark

Copy link
Copy Markdown

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:

  1. Go to https://courses.campus-dev.opencraft.hosting/register?next=/dashboard and login with either MOE SSO/FB/Google credentials.
  2. Verify that the username field being auto-filled is correct.

Reviewers:
@pomegranited

@pkulkark
pkulkark force-pushed the pooja/gingko-fix-username-hints-with-SSO branch from e2f75f6 to a392bf7 Compare June 25, 2019 03:45

@pomegranited pomegranited left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pkulkark ! 👍 once my nit below is fixed, and tests are passing again.

  • I tested this as described in the PR, using MOE (SAML), Facebook, and Google SSO.
  • I read through the code
  • I checked for accessibility issues N/A
  • Includes documentation N/A -- uses existing feature flag

settings.apply_settings(self.settings)
self.assertIn('enterprise.tpa_pipeline.handle_enterprise_logistration', self.settings.SOCIAL_AUTH_PIPELINE)

def test_apply_settings_avoids_default_username_check(self):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could you add a test for the default setting of self.settings.SOCIAL_AUTH_CLEAN_USERNAMES = True too, just to be complete?

@pkulkark

Copy link
Copy Markdown
Author

Thanks @pomegranited. I added the test for default setting as well. Will merge this now.

@pkulkark
pkulkark merged commit 4f296a8 into opencraft-release/ginkgo.2-campus Jun 25, 2019
@pomegranited
pomegranited deleted the pooja/gingko-fix-username-hints-with-SSO branch June 26, 2019 01:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants