Removes enterprise filter for account recovery banner

Previously code was only showing banner for enterprise
learners. This patch would remove this restriction
and is available to all edX learners provided that
'enable_secondary_email_feature' is switched on.

PROD-1477
This commit is contained in:
Adeel Khan
2020-04-29 15:56:13 +05:00
parent 70600d79d7
commit 9778e69c76
4 changed files with 6 additions and 18 deletions

View File

@@ -40,7 +40,7 @@ from openedx.core.djangoapps.plugins.plugin_contexts import get_plugins_view_con
from openedx.core.djangoapps.programs.models import ProgramsApiConfig
from openedx.core.djangoapps.programs.utils import ProgramDataExtender, ProgramProgressMeter
from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers
from openedx.core.djangoapps.user_api.accounts.utils import is_secondary_email_feature_enabled_for_user
from openedx.core.djangoapps.user_api.accounts.utils import is_secondary_email_feature_enabled
from openedx.core.djangoapps.util.maintenance_banner import add_maintenance_banner
from openedx.core.djangoapps.waffle_utils import WaffleFlag, WaffleFlagNamespace
from openedx.core.djangolib.markup import HTML, Text
@@ -655,7 +655,7 @@ def student_dashboard(request):
enterprise_message = get_dashboard_consent_notification(request, user, course_enrollments)
recovery_email_message = recovery_email_activation_message = None
if is_secondary_email_feature_enabled_for_user(user=user):
if is_secondary_email_feature_enabled():
try:
pending_email = PendingSecondaryEmailChange.objects.get(user=user)
except PendingSecondaryEmailChange.DoesNotExist: