From 267f4966004b2a0053fa53d10da308ce9735b486 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 29 Oct 2024 11:14:46 -0400 Subject: [PATCH 1/2] feat: bump edx-enterprise to 4.30.0, extend system-wide roles for enrollment intentions feature --- lms/envs/common.py | 7 +++++++ requirements/constraints.txt | 2 +- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/doc.txt | 2 +- requirements/edx/testing.txt | 2 +- 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index 2f47e006c693..6d9b6b528e55 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -50,6 +50,7 @@ from django.utils.translation import gettext_lazy as _ from enterprise.constants import ( ENTERPRISE_ADMIN_ROLE, + ENTERPRISE_LEARNER_ROLE, ENTERPRISE_CATALOG_ADMIN_ROLE, ENTERPRISE_DASHBOARD_ADMIN_ROLE, ENTERPRISE_ENROLLMENT_API_ADMIN_ROLE, @@ -60,6 +61,7 @@ SYSTEM_ENTERPRISE_PROVISIONING_ADMIN_ROLE, PROVISIONING_ENTERPRISE_CUSTOMER_ADMIN_ROLE, PROVISIONING_PENDING_ENTERPRISE_CUSTOMER_ADMIN_ROLE, + DEFAULT_ENTERPRISE_ENROLLMENT_INTENTIONS_ROLE, ) from openedx.core.constants import COURSE_KEY_REGEX, COURSE_KEY_PATTERN, COURSE_ID_PATTERN @@ -4722,11 +4724,15 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring ENTERPRISE_CUSTOMER_COOKIE_NAME = 'enterprise_customer_uuid' BASE_COOKIE_DOMAIN = 'localhost' SYSTEM_TO_FEATURE_ROLE_MAPPING = { + ENTERPRISE_LEARNER_ROLE: [ + DEFAULT_ENTERPRISE_ENROLLMENT_INTENTIONS_ROLE, + ], ENTERPRISE_ADMIN_ROLE: [ ENTERPRISE_DASHBOARD_ADMIN_ROLE, ENTERPRISE_CATALOG_ADMIN_ROLE, ENTERPRISE_ENROLLMENT_API_ADMIN_ROLE, ENTERPRISE_REPORTING_CONFIG_ADMIN_ROLE, + DEFAULT_ENTERPRISE_ENROLLMENT_INTENTIONS_ROLE, ], ENTERPRISE_OPERATOR_ROLE: [ ENTERPRISE_DASHBOARD_ADMIN_ROLE, @@ -4735,6 +4741,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring ENTERPRISE_REPORTING_CONFIG_ADMIN_ROLE, ENTERPRISE_FULFILLMENT_OPERATOR_ROLE, ENTERPRISE_SSO_ORCHESTRATOR_OPERATOR_ROLE, + DEFAULT_ENTERPRISE_ENROLLMENT_INTENTIONS_ROLE, ], SYSTEM_ENTERPRISE_PROVISIONING_ADMIN_ROLE: [ PROVISIONING_ENTERPRISE_CUSTOMER_ADMIN_ROLE, diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 6c8fe968b230..0292e08f6189 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -82,7 +82,7 @@ django-storages<1.14.4 # The team that owns this package will manually bump this package rather than having it pulled in automatically. # This is to allow them to better control its deployment and to do it in a process that works better # for them. -edx-enterprise==4.29.0 +edx-enterprise==4.30.0 # Date: 2024-05-09 # This has to be constrained as well because newer versions of edx-i18n-tools need the diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index a6af0a610cd5..a0117e573084 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -467,7 +467,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==4.29.0 +edx-enterprise==4.30.0 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/kernel.in diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 49bbe5bf53f8..485a57753a68 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -741,7 +741,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==4.29.0 +edx-enterprise==4.30.0 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/doc.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 64dc11f07612..5f6f0e1162ad 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -547,7 +547,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==4.29.0 +edx-enterprise==4.30.0 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 7853f39c6f9e..fc60c467d4ab 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -571,7 +571,7 @@ edx-drf-extensions==10.5.0 # edx-when # edxval # openedx-learning -edx-enterprise==4.29.0 +edx-enterprise==4.30.0 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt From 9aab201d91f86502a98e35d291fea151254dcae2 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 29 Oct 2024 11:25:41 -0400 Subject: [PATCH 2/2] chore: quality --- lms/envs/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index 6d9b6b528e55..c7e38441e35b 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -4725,7 +4725,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring BASE_COOKIE_DOMAIN = 'localhost' SYSTEM_TO_FEATURE_ROLE_MAPPING = { ENTERPRISE_LEARNER_ROLE: [ - DEFAULT_ENTERPRISE_ENROLLMENT_INTENTIONS_ROLE, + DEFAULT_ENTERPRISE_ENROLLMENT_INTENTIONS_ROLE, ], ENTERPRISE_ADMIN_ROLE: [ ENTERPRISE_DASHBOARD_ADMIN_ROLE,