fix: tweak namespace for SSO username generation (#31631)

This commit is contained in:
John Nagro
2023-01-20 11:47:15 -05:00
committed by GitHub
parent 3d2d02bffe
commit b68ea9194d
2 changed files with 2 additions and 2 deletions

View File

@@ -100,7 +100,7 @@ def apply_settings(django_settings):
django_settings.SOCIAL_AUTH_INACTIVE_USER_URL = '/auth/inactive'
# Context processors required under Django.
django_settings.SOCIAL_AUTH_UUID_LENGTH = 16
django_settings.SOCIAL_AUTH_UUID_LENGTH = 6
django_settings.DEFAULT_TEMPLATE_ENGINE['OPTIONS']['context_processors'] += (
'social_django.context_processors.backends',
'social_django.context_processors.login_redirect',

View File

@@ -78,7 +78,7 @@ class PipelineOverridesTest(SamlIntegrationTestUtilities, IntegrationTestMixin,
('S.K.', 'S_K', False),
('S.K.', 'S_K_-9fe2', True),
('usernamewithcharacterlengthofmorethan30chars', 'usernamewithcharacterlengthofm', False),
('usernamewithcharacterlengthofmorethan30chars', 'usernamewithch-9fe2', True),
('usernamewithcharacterlengthofmorethan30chars', 'usernamewithcharacterlen-9fe2', True),
)
@ddt.unpack
@mock.patch('common.djangoapps.third_party_auth.pipeline.user_exists')