Skip to content
Snippets Groups Projects
Unverified Commit 8da01534 authored by Diana Huang's avatar Diana Huang Committed by GitHub
Browse files

Merge pull request #18298 from edx/diana/hide-button-white-label

LEARNER-5434: Add a configuration option for deleting student accounts.
parents 58d059a1 65f0f680
No related merge requests found
......@@ -196,7 +196,11 @@ class AccountSettingsPageTest(AccountSettingsTestMixin, AcceptanceTest):
'Facebook Link',
'LinkedIn Link',
]
}
},
{
'title': 'Delete My Account',
'fields': []
},
]
self.assertEqual(self.account_settings_page.sections_structure(), expected_sections_structure)
......
......@@ -568,6 +568,9 @@ def account_settings_context(request):
'show_program_listing': ProgramsApiConfig.is_enabled(),
'show_dashboard_tabs': True,
'order_history': user_orders,
'enable_account_deletion': configuration_helpers.get_value(
'ENABLE_ACCOUNT_DELETION', settings.FEATURES.get('ENABLE_ACCOUNT_DELETION', False)
),
'extended_profile_fields': _get_extended_profile_fields(),
}
......
......@@ -402,6 +402,9 @@ FEATURES = {
# Set this to true to make API docs available at /api-docs/.
'ENABLE_API_DOCS': False,
# Whether to display the account deletion section the account settings page
'ENABLE_ACCOUNT_DELETION': True,
}
# Settings for the course reviews tool template and identification key, set either to None to disable course reviews
......
......@@ -27,6 +27,7 @@
enterpriseReadonlyAccountFields,
edxSupportUrl,
extendedProfileFields,
displayAccountDeletion,
enableGDPRFlag
) {
var $accountSettingsElement, userAccountModel, userPreferencesModel, aboutSectionsData,
......@@ -292,7 +293,7 @@
aboutSectionsData.push(socialFields);
// Add account deletion fields
if (enableGDPRFlag) {
if (displayAccountDeletion) {
accountDeletionFields = {
title: gettext('Delete My Account'),
fields: [],
......
......@@ -48,6 +48,7 @@ from openedx.features.course_experience import ENABLE_GDPR_COMPAT_FLAG
enterpriseReadonlyAccountFields = ${ enterprise_readonly_account_fields | n, dump_js_escaped_json },
edxSupportUrl = '${ edx_support_url | n, js_escaped_string }',
extendedProfileFields = ${ extended_profile_fields | n, dump_js_escaped_json },
displayAccountDeletion = ${ enable_account_deletion | n, dump_js_escaped_json};
enableGDPRFlag = ${ ENABLE_GDPR_COMPAT_FLAG.is_enabled_without_course_context() | n, dump_js_escaped_json };
AccountSettingsFactory(
......@@ -68,6 +69,7 @@ from openedx.features.course_experience import ENABLE_GDPR_COMPAT_FLAG
enterpriseReadonlyAccountFields,
edxSupportUrl,
extendedProfileFields,
displayAccountDeletion,
enableGDPRFlag
);
</%static:require_module>
......
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