From a7a39758952a70c3d5448b381f490dd8381a138f Mon Sep 17 00:00:00 2001 From: zamanafzal Date: Tue, 29 Jun 2021 13:25:14 +0500 Subject: [PATCH] ENT4083: Removed ENABLE_MULTIPLE_USER_ENTERPRISES_FEATURE waffle switch --- .../js/student_account/views/AccessView.js | 4 +--- .../djangoapps/user_api/accounts/utils.py | 11 --------- .../djangoapps/user_api/config/__init__.py | 0 .../core/djangoapps/user_api/config/waffle.py | 23 ------------------- .../djangoapps/user_authn/views/login_form.py | 2 -- 5 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 openedx/core/djangoapps/user_api/config/__init__.py delete mode 100644 openedx/core/djangoapps/user_api/config/waffle.py diff --git a/lms/static/js/student_account/views/AccessView.js b/lms/static/js/student_account/views/AccessView.js index 8c692f467168..9687fc100063 100644 --- a/lms/static/js/student_account/views/AccessView.js +++ b/lms/static/js/student_account/views/AccessView.js @@ -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); diff --git a/openedx/core/djangoapps/user_api/accounts/utils.py b/openedx/core/djangoapps/user_api/accounts/utils.py index a73d538cef56..fea9bb8a2f73 100644 --- a/openedx/core/djangoapps/user_api/accounts/utils.py +++ b/openedx/core/djangoapps/user_api/accounts/utils.py @@ -17,7 +17,6 @@ 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 diff --git a/openedx/core/djangoapps/user_api/config/__init__.py b/openedx/core/djangoapps/user_api/config/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/openedx/core/djangoapps/user_api/config/waffle.py b/openedx/core/djangoapps/user_api/config/waffle.py deleted file mode 100644 index 792d722e1e74..000000000000 --- a/openedx/core/djangoapps/user_api/config/waffle.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -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__ -) diff --git a/openedx/core/djangoapps/user_authn/views/login_form.py b/openedx/core/djangoapps/user_authn/views/login_form.py index af8c2ab2c5b3..8811f3e7ab6d 100644 --- a/openedx/core/djangoapps/user_authn/views/login_form.py +++ b/openedx/core/djangoapps/user_authn/views/login_form.py @@ -19,7 +19,6 @@ 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(),