Logistration MFE renamed to authn
VAN-300
This commit is contained in:
@@ -22,7 +22,7 @@ from openedx.core.djangoapps.site_configuration import helpers as configuration_
|
||||
from openedx.core.djangoapps.theming.helpers import get_current_site
|
||||
from openedx.core.djangoapps.user_api import accounts as accounts_settings
|
||||
from openedx.core.djangoapps.user_api.accounts.utils import is_secondary_email_feature_enabled
|
||||
from openedx.core.djangoapps.user_authn.utils import should_redirect_to_logistration_mircrofrontend
|
||||
from openedx.core.djangoapps.user_authn.utils import should_redirect_to_authn_microfrontend
|
||||
from openedx.core.djangoapps.user_api.preferences.api import get_user_preference
|
||||
from common.djangoapps.student.message_types import AccountRecovery as AccountRecoveryMessage
|
||||
from common.djangoapps.student.models import CourseEnrollmentAllowed, email_exists_or_retired
|
||||
@@ -39,7 +39,7 @@ def send_account_recovery_email_for_user(user, request, email=None):
|
||||
"""
|
||||
site = get_current_site()
|
||||
message_context = get_base_template_context(site)
|
||||
site_name = settings.LOGISTRATION_MICROFRONTEND_DOMAIN if should_redirect_to_logistration_mircrofrontend() \
|
||||
site_name = settings.AUTHN_MICROFRONTEND_DOMAIN if should_redirect_to_authn_microfrontend() \
|
||||
else configuration_helpers.get_value('SITE_NAME', settings.SITE_NAME)
|
||||
message_context.update({
|
||||
'request': request, # Used by google_analytics_tracking_pixel
|
||||
|
||||
@@ -16,7 +16,7 @@ from common.djangoapps.student.tests.factories import UserFactory
|
||||
|
||||
|
||||
FEATURES_WITH_LOGIN_MFE_ENABLED = settings.FEATURES.copy()
|
||||
FEATURES_WITH_LOGIN_MFE_ENABLED['ENABLE_LOGISTRATION_MICROFRONTEND'] = True
|
||||
FEATURES_WITH_LOGIN_MFE_ENABLED['ENABLE_AUTHN_MICROFRONTEND'] = True
|
||||
|
||||
|
||||
@unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms')
|
||||
@@ -158,7 +158,7 @@ class TestActivateAccount(TestCase):
|
||||
login page with correct query param.
|
||||
"""
|
||||
login_page_url = "{authn_mfe}/login?account_activation_status=".format(
|
||||
authn_mfe=settings.LOGISTRATION_MICROFRONTEND_URL
|
||||
authn_mfe=settings.AUTHN_MICROFRONTEND_URL
|
||||
)
|
||||
|
||||
self._assert_user_active_state(expected_active_state=False)
|
||||
|
||||
@@ -50,7 +50,7 @@ from openedx.core.djangoapps.programs.models import ProgramsApiConfig
|
||||
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
|
||||
from openedx.core.djangoapps.theming import helpers as theming_helpers
|
||||
from openedx.core.djangoapps.user_api.preferences import api as preferences_api
|
||||
from openedx.core.djangoapps.user_authn.utils import should_redirect_to_logistration_mircrofrontend
|
||||
from openedx.core.djangoapps.user_authn.utils import should_redirect_to_authn_microfrontend
|
||||
from openedx.core.djangolib.markup import HTML, Text
|
||||
from common.djangoapps.student.helpers import DISABLE_UNENROLL_CERT_STATES, cert_info, generate_activation_email_context
|
||||
from common.djangoapps.student.message_types import AccountActivation, EmailChange, EmailChangeConfirmation, RecoveryEmailCreate
|
||||
@@ -547,9 +547,9 @@ def activate_account(request, key):
|
||||
extra_tags='account-activation aa-icon',
|
||||
)
|
||||
|
||||
if should_redirect_to_logistration_mircrofrontend() and not request.user.is_authenticated:
|
||||
if should_redirect_to_authn_microfrontend() and not request.user.is_authenticated:
|
||||
url_path = '/login?account_activation_status={}'.format(activation_message_type)
|
||||
return redirect(settings.LOGISTRATION_MICROFRONTEND_URL + url_path)
|
||||
return redirect(settings.AUTHN_MICROFRONTEND_URL + url_path)
|
||||
|
||||
return redirect('dashboard')
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ from lms.djangoapps.verify_student.utils import earliest_allowed_verification_da
|
||||
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
|
||||
from openedx.core.djangoapps.user_api import accounts
|
||||
from openedx.core.djangoapps.user_authn import cookies as user_authn_cookies
|
||||
from openedx.core.djangoapps.user_authn.utils import should_redirect_to_logistration_mircrofrontend
|
||||
from openedx.core.djangoapps.user_authn.utils import should_redirect_to_authn_microfrontend
|
||||
from common.djangoapps.third_party_auth.utils import user_exists
|
||||
from common.djangoapps.track import segment
|
||||
from common.djangoapps.util.json_request import JsonResponse
|
||||
@@ -129,8 +129,8 @@ AUTH_ENTRY_REGISTER_API = 'register_api'
|
||||
# registration/login form/logic.
|
||||
AUTH_ENTRY_CUSTOM = getattr(settings, 'THIRD_PARTY_AUTH_CUSTOM_AUTH_FORMS', {})
|
||||
|
||||
# If logistration MFE is enabled, the redirect should be to MFE instead of FE
|
||||
BASE_URL = settings.LOGISTRATION_MICROFRONTEND_URL if should_redirect_to_logistration_mircrofrontend() else ''
|
||||
# If authn MFE is enabled, the redirect should be to MFE instead of FE
|
||||
BASE_URL = settings.AUTHN_MICROFRONTEND_URL if should_redirect_to_authn_microfrontend() else ''
|
||||
|
||||
|
||||
def is_api(auth_entry):
|
||||
|
||||
Reference in New Issue
Block a user