diff --git a/lms/envs/common.py b/lms/envs/common.py index 84a15b8a29..2693d652ec 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -3968,7 +3968,6 @@ ACCOUNT_VISIBILITY_CONFIGURATION["admin_fields"] = ( "year_of_birth", "phone_number", "activation_key", - "is_verified_name_enabled", ] ) diff --git a/openedx/core/djangoapps/user_api/accounts/serializers.py b/openedx/core/djangoapps/user_api/accounts/serializers.py index c6198ef51c..1569fcfaab 100644 --- a/openedx/core/djangoapps/user_api/accounts/serializers.py +++ b/openedx/core/djangoapps/user_api/accounts/serializers.py @@ -13,8 +13,6 @@ from django.core.exceptions import ObjectDoesNotExist from django.urls import reverse from rest_framework import serializers -from edx_name_affirmation.toggles import is_verified_name_enabled - from common.djangoapps.student.models import UserPasswordToggleHistory from lms.djangoapps.badges.utils import badges_enabled from openedx.core.djangoapps.site_configuration import helpers as configuration_helpers @@ -163,7 +161,6 @@ class UserReadOnlySerializer(serializers.Serializer): # lint-amnesty, pylint: d "social_links": None, "extended_profile_fields": None, "phone_number": None, - "is_verified_name_enabled": is_verified_name_enabled(), } if user_profile: diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_api.py b/openedx/core/djangoapps/user_api/accounts/tests/test_api.py index 496641040a..8fc00a19c8 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_api.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_api.py @@ -554,8 +554,7 @@ class AccountSettingsOnCreationTest(CreateAccountMixin, TestCase): 'secondary_email_enabled': None, 'time_zone': None, 'course_certificates': None, - 'phone_number': None, - 'is_verified_name_enabled': False, + 'phone_number': None } def test_normalize_password(self): diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py index 15c69de3d4..6d9b4c4737 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_views.py @@ -276,7 +276,7 @@ class TestAccountsAPI(CacheIsolationTestCase, UserAPITestCase): Verify that all account fields are returned (even those that are not shareable). """ data = response.data - assert 29 == len(data) + assert 28 == len(data) # public fields (3) expected_account_privacy = ( @@ -417,7 +417,7 @@ class TestAccountsAPI(CacheIsolationTestCase, UserAPITestCase): """ self.different_client.login(username=self.different_user.username, password=TEST_PASSWORD) self.create_mock_profile(self.user) - with self.assertNumQueries(26): + with self.assertNumQueries(25): response = self.send_get(self.different_client) self._verify_full_shareable_account_response(response, account_privacy=ALL_USERS_VISIBILITY) @@ -432,7 +432,7 @@ class TestAccountsAPI(CacheIsolationTestCase, UserAPITestCase): """ self.different_client.login(username=self.different_user.username, password=TEST_PASSWORD) self.create_mock_profile(self.user) - with self.assertNumQueries(26): + with self.assertNumQueries(25): response = self.send_get(self.different_client) self._verify_private_account_response(response) @@ -556,7 +556,7 @@ class TestAccountsAPI(CacheIsolationTestCase, UserAPITestCase): with self.assertNumQueries(queries): response = self.send_get(self.client) data = response.data - assert 29 == len(data) + assert 28 == len(data) assert self.user.username == data['username'] assert ((self.user.first_name + ' ') + self.user.last_name) == data['name'] for empty_field in ("year_of_birth", "level_of_education", "mailing_address", "bio"): @@ -579,7 +579,7 @@ class TestAccountsAPI(CacheIsolationTestCase, UserAPITestCase): assert data['accomplishments_shared'] is False self.client.login(username=self.user.username, password=TEST_PASSWORD) - verify_get_own_information(24) + verify_get_own_information(23) # Now make sure that the user can get the same information, even if not active self.user.is_active = False @@ -599,7 +599,7 @@ class TestAccountsAPI(CacheIsolationTestCase, UserAPITestCase): legacy_profile.save() self.client.login(username=self.user.username, password=TEST_PASSWORD) - with self.assertNumQueries(24): + with self.assertNumQueries(23): response = self.send_get(self.client) for empty_field in ("level_of_education", "gender", "country", "state", "bio",): assert response.data[empty_field] is None @@ -955,7 +955,7 @@ class TestAccountsAPI(CacheIsolationTestCase, UserAPITestCase): response = self.send_get(client) if has_full_access: data = response.data - assert 29 == len(data) + assert 28 == len(data) assert self.user.username == data['username'] assert ((self.user.first_name + ' ') + self.user.last_name) == data['name'] assert self.user.email == data['email'] diff --git a/openedx/core/djangoapps/user_api/accounts/views.py b/openedx/core/djangoapps/user_api/accounts/views.py index 2ae2d1f780..0befff9b3c 100644 --- a/openedx/core/djangoapps/user_api/accounts/views.py +++ b/openedx/core/djangoapps/user_api/accounts/views.py @@ -246,9 +246,6 @@ class AccountViewSet(ViewSet): * phone_number: The phone number for the user. String of numbers with an optional `+` sign at the start. - * is_verified_name_enabled: Temporary flag to control verified name field - see - https://github.com/edx/edx-name-affirmation/blob/main/edx_name_affirmation/toggles.py - For all text fields, plain text instead of HTML is supported. The data is stored exactly as specified. Clients must HTML escape rendered values to avoid script injections. diff --git a/requirements/edx/base.in b/requirements/edx/base.in index 55f7dc0acf..6d5a790474 100644 --- a/requirements/edx/base.in +++ b/requirements/edx/base.in @@ -85,7 +85,6 @@ edx-drf-extensions edx-enterprise edx-event-routing-backends edx-milestones -edx-name-affirmation>=0.1.2 edx-organizations edx-proctoring>=2.0.1 edx-proctoring-proctortrack==1.0.5 # Intentionally and permanently pinned to ensure code changes are reviewed diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 538828aaf1..e806cb8844 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -201,8 +201,6 @@ django==2.2.24 # edx-event-routing-backends # edx-i18n-tools # edx-milestones - # edx-name-affirmation - # edx-opaque-keys # edx-organizations # edx-proctoring # edx-rbac @@ -289,7 +287,6 @@ django-model-utils==4.1.1 # edx-completion # edx-enterprise # edx-milestones - # edx-name-affirmation # edx-organizations # edx-proctoring # edx-rbac @@ -369,7 +366,6 @@ djangorestframework==3.12.4 # edx-completion # edx-drf-extensions # edx-enterprise - # edx-name-affirmation # edx-organizations # edx-proctoring # edx-submissions @@ -428,7 +424,6 @@ edx-drf-extensions==6.5.0 # -r requirements/edx/base.in # edx-completion # edx-enterprise - # edx-name-affirmation # edx-organizations # edx-proctoring # edx-rbac @@ -444,8 +439,6 @@ edx-i18n-tools==0.5.3 # via ora2 edx-milestones==0.3.1 # via -r requirements/edx/base.in -edx-name-affirmation==0.1.2 - # via -r requirements/edx/base.in edx-opaque-keys[django]==2.2.2 # via # -r requirements/edx/paver.txt @@ -492,7 +485,6 @@ edx-toggles==4.2.0 # -r requirements/edx/base.in # edx-completion # edx-event-routing-backends - # edx-name-affirmation # edxval # ora2 edx-user-state-client==1.3.2 diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index ca688aafe0..494af7d988 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -267,8 +267,6 @@ django==2.2.24 # edx-i18n-tools # edx-lint # edx-milestones - # edx-name-affirmation - # edx-opaque-keys # edx-organizations # edx-proctoring # edx-rbac @@ -363,7 +361,6 @@ django-model-utils==4.1.1 # edx-completion # edx-enterprise # edx-milestones - # edx-name-affirmation # edx-organizations # edx-proctoring # edx-rbac @@ -447,7 +444,6 @@ djangorestframework==3.12.4 # edx-completion # edx-drf-extensions # edx-enterprise - # edx-name-affirmation # edx-organizations # edx-proctoring # edx-submissions @@ -517,7 +513,6 @@ edx-drf-extensions==6.5.0 # -r requirements/edx/testing.txt # edx-completion # edx-enterprise - # edx-name-affirmation # edx-organizations # edx-proctoring # edx-rbac @@ -537,8 +532,6 @@ edx-lint==5.0.0 # via -r requirements/edx/testing.txt edx-milestones==0.3.1 # via -r requirements/edx/testing.txt -edx-name-affirmation==0.1.2 - # via -r requirements/edx/testing.txt edx-opaque-keys[django]==2.2.2 # via # -r requirements/edx/testing.txt @@ -591,7 +584,6 @@ edx-toggles==4.2.0 # -r requirements/edx/testing.txt # edx-completion # edx-event-routing-backends - # edx-name-affirmation # edxval # ora2 edx-user-state-client==1.3.2 diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index ecc6acbb8a..cd2c4de627 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -256,8 +256,6 @@ distlib==0.3.2 # edx-i18n-tools # edx-lint # edx-milestones - # edx-name-affirmation - # edx-opaque-keys # edx-organizations # edx-proctoring # edx-rbac @@ -350,7 +348,6 @@ django-model-utils==4.1.1 # edx-completion # edx-enterprise # edx-milestones - # edx-name-affirmation # edx-organizations # edx-proctoring # edx-rbac @@ -434,7 +431,6 @@ djangorestframework==3.12.4 # edx-completion # edx-drf-extensions # edx-enterprise - # edx-name-affirmation # edx-organizations # edx-proctoring # edx-submissions @@ -502,7 +498,6 @@ edx-drf-extensions==6.5.0 # -r requirements/edx/base.txt # edx-completion # edx-enterprise - # edx-name-affirmation # edx-organizations # edx-proctoring # edx-rbac @@ -523,8 +518,6 @@ edx-lint==5.0.0 # via -r requirements/edx/testing.in edx-milestones==0.3.1 # via -r requirements/edx/base.txt -edx-name-affirmation==0.1.2 - # via -r requirements/edx/base.txt edx-opaque-keys[django]==2.2.2 # via # -r requirements/edx/base.txt @@ -575,7 +568,6 @@ edx-toggles==4.2.0 # -r requirements/edx/base.txt # edx-completion # edx-event-routing-backends - # edx-name-affirmation # edxval # ora2 edx-user-state-client==1.3.2