Skip to content
Snippets Groups Projects
Unverified Commit 843e9ba2 authored by Zaman Afzal's avatar Zaman Afzal Committed by GitHub
Browse files

ENT4083: Removed ENABLE_MULTIPLE_USER_ENTERPRISES_FEATURE waffle switch (#28057)

parent 7212c747
No related branches found
Tags release-2021-06-30-06.16
No related merge requests found
......@@ -81,8 +81,6 @@
this.enterpriseSlugLoginURL = options.enterprise_slug_login_url || '';
this.isEnterpriseEnable = options.is_enterprise_enable || false;
this.isAccountRecoveryFeatureEnabled = options.is_account_recovery_feature_enabled || false;
this.isMultipleUserEnterprisesFeatureEnabled =
options.is_multiple_user_enterprises_feature_enabled || false;
this.is_require_third_party_auth_enabled = options.is_require_third_party_auth_enabled || false;
// The login view listens for 'sync' events from the reset model
......@@ -173,7 +171,7 @@
this.listenTo(this.subview.login, 'password-help', this.resetPassword);
// Listen for 'auth-complete' event so we can enroll/redirect the user appropriately.
if (this.isMultipleUserEnterprisesFeatureEnabled === true && !isTpaSaml) {
if (!isTpaSaml) {
this.listenTo(this.subview.login, 'auth-complete', this.loginComplete);
} else {
this.listenTo(this.subview.login, 'auth-complete', this.authComplete);
......
......@@ -17,7 +17,6 @@ from common.djangoapps.student.models import AccountRecovery, Registration, get_
from openedx.core.djangolib.oauth2_retirement_utils import retire_dot_oauth2_models
from openedx.core.djangoapps.site_configuration.models import SiteConfiguration
from openedx.core.djangoapps.theming.helpers import get_config_value_from_site_or_settings, get_current_site
from openedx.core.djangoapps.user_api.config.waffle import ENABLE_MULTIPLE_USER_ENTERPRISES_FEATURE
from xmodule.modulestore.django import modulestore
from xmodule.modulestore.exceptions import ItemNotFoundError
......@@ -192,16 +191,6 @@ def is_secondary_email_feature_enabled():
return waffle.switch_is_active(ENABLE_SECONDARY_EMAIL_FEATURE_SWITCH)
def is_multiple_user_enterprises_feature_enabled():
"""
Checks to see if the django-waffle switch for enabling the multiple user enterprises feature is active
Returns:
Boolean value representing switch status
"""
return ENABLE_MULTIPLE_USER_ENTERPRISES_FEATURE.is_enabled()
def create_retirement_request_and_deactivate_account(user):
"""
Adds user to retirement queue, unlinks social auth accounts, changes user passwords
......
"""
Waffle flags and switches to change user API functionality.
"""
from django.utils.translation import ugettext_lazy as _
from edx_toggles.toggles import WaffleSwitch
SYSTEM_MAINTENANCE_MSG = _('System maintenance in progress. Please try again later.')
# .. toggle_name: user_api.enable_multiple_user_enterprises_feature
# .. toggle_implementation: WaffleSwitch
# .. toggle_default: False
# .. toggle_description: If enabled then learners linked to multiple enterprises will be asked to select default
# enterprise for current session.
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2019-11-01
# .. toggle_target_removal_date: 2021-06-01
# .. toggle_tickets: ENT-2339, ENT-4041
ENABLE_MULTIPLE_USER_ENTERPRISES_FEATURE = WaffleSwitch(
'user_api.enable_multiple_user_enterprises_feature', __name__
)
......@@ -19,7 +19,6 @@ from common.djangoapps.edxmako.shortcuts import render_to_response
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
from openedx.core.djangoapps.user_api import accounts
from openedx.core.djangoapps.user_api.accounts.utils import (
is_multiple_user_enterprises_feature_enabled,
is_secondary_email_feature_enabled
)
from openedx.core.djangoapps.user_api.helpers import FormDescription
......@@ -260,7 +259,6 @@ def login_and_registration_form(request, initial_mode="login"):
'account_creation_allowed': configuration_helpers.get_value(
'ALLOW_PUBLIC_ACCOUNT_CREATION', settings.FEATURES.get('ALLOW_PUBLIC_ACCOUNT_CREATION', True)),
'is_account_recovery_feature_enabled': is_secondary_email_feature_enabled(),
'is_multiple_user_enterprises_feature_enabled': is_multiple_user_enterprises_feature_enabled(),
'enterprise_slug_login_url': get_enterprise_slug_login_url(),
'is_enterprise_enable': enterprise_enabled(),
'is_require_third_party_auth_enabled': is_require_third_party_auth_enabled(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment