Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion lms/djangoapps/student_account/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,24 @@ def login_and_registration_form(request, initial_mode="login"):
except (KeyError, ValueError, IndexError):
pass

third_party_auth = _third_party_auth_context(request, redirect_to)
if not third_party_auth['currentProvider'] and settings.APPSEMBLER_FEATURES.get('ENABLE_EXCLUSIVE_SSO_LOGISTRATION'):
urls_dict = configuration_helpers.get_value(
'EXCLUSIVE_SSO_LOGISTRATION_URL_MAP',
settings.EXCLUSIVE_SSO_LOGISTRATION_URL_MAP)
if initial_mode == 'register':
if 'register' in urls_dict:
return redirect(urls_dict['register'])
elif initial_mode == 'login':
if 'login' in urls_dict:
return redirect(urls_dict['login'])

# Otherwise, render the combined login/registration page
context = {
'data': {
'login_redirect_url': redirect_to,
'initial_mode': initial_mode,
'third_party_auth': _third_party_auth_context(request, redirect_to),
'third_party_auth': third_party_auth,
'third_party_auth_hint': third_party_auth_hint or '',
'platform_name': configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME),

Expand Down
2 changes: 2 additions & 0 deletions lms/envs/aws_appsembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,5 @@
CORS_REPLACE_HTTPS_REFERER = True

CUSTOM_SSO_FIELDS_SYNC = ENV_TOKENS.get('CUSTOM_SSO_FIELDS_SYNC', {})

EXCLUSIVE_SSO_LOGISTRATION_URL_MAP = ENV_TOKENS.get('EXCLUSIVE_SSO_LOGISTRATION_URL_MAP', {})
2 changes: 2 additions & 0 deletions lms/envs/devstack_appsembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@
SP_SAML_RESTRICT_MODE = False

CUSTOM_SSO_FIELDS_SYNC = ENV_TOKENS.get('CUSTOM_SSO_FIELDS_SYNC', {})

EXCLUSIVE_SSO_LOGISTRATION_URL_MAP = ENV_TOKENS.get('EXCLUSIVE_SSO_LOGISTRATION_URL_MAP', {})