Skip to content

Commit 2f437fe

Browse files
pwnage101claude
andcommitted
feat: hand OPEN_EDX_FILTERS_CONFIG enterpise injection ownership to enterprise/consent plugin
The goal of this migrated logic is to be able to inject enterprise-specific pipeline steps while preserving any operator-defined keys and pipeline steps. It is being migrated into the enterprise/consent plugins to better compartmentalize enterprise-specific logic and keep enterprise code paths outside of the platform. ENT-11830 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 564ac66 commit 2f437fe

7 files changed

Lines changed: 5 additions & 36 deletions

File tree

lms/envs/common.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3773,23 +3773,6 @@ def _should_send_certificate_events(settings):
37733773
# The project ID should be obtained from the Google Cloud Console when creating a reCAPTCHA
37743774
RECAPTCHA_PROJECT_ID = None
37753775

3776-
# .. setting_name: OPEN_EDX_FILTERS_CONFIG
3777-
# .. setting_default: {}
3778-
# .. setting_description: Configuration dict for openedx-filters pipeline steps.
3779-
# Keys are filter type strings; values are dicts with 'fail_silently' (bool) and
3780-
# 'pipeline' (list of dotted-path strings to PipelineStep subclasses).
3781-
OPEN_EDX_FILTERS_CONFIG = {
3782-
"org.openedx.learning.account.settings.read_only_fields.requested.v1": {
3783-
"fail_silently": False,
3784-
"pipeline": ["enterprise.filters.accounts.AccountSettingsEnterpriseReadOnlyFieldsStep"],
3785-
},
3786-
"org.openedx.learning.dashboard.render.started.v1": {
3787-
"fail_silently": False,
3788-
"pipeline": ["enterprise.filters.dashboard.DashboardContextEnricher"],
3789-
},
3790-
}
3791-
3792-
37933776
############################## Miscellaneous ###############################
37943777

37953778
# To limit the number of courses displayed on learner dashboard

lms/envs/production.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def get_env_setting(setting):
8484
'EVENT_BUS_PRODUCER_CONFIG',
8585
'DEFAULT_FILE_STORAGE',
8686
'STATICFILES_STORAGE',
87-
'OPEN_EDX_FILTERS_CONFIG',
8887
]
8988
})
9089

@@ -282,19 +281,6 @@ def get_env_setting(setting):
282281
EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST
283282
)
284283

285-
# Merge OPEN_EDX_FILTERS_CONFIG from YAML into the default defined in common.py.
286-
# Pipeline steps from YAML are appended after steps defined in common.py.
287-
# The fail_silently value from YAML takes precedence over the one in common.py.
288-
for _filter_type, _filter_config in _YAML_TOKENS.get('OPEN_EDX_FILTERS_CONFIG', {}).items():
289-
if _filter_type in OPEN_EDX_FILTERS_CONFIG: # noqa: F405
290-
OPEN_EDX_FILTERS_CONFIG[_filter_type]['pipeline'].extend( # noqa: F405
291-
_filter_config.get('pipeline', [])
292-
)
293-
if 'fail_silently' in _filter_config:
294-
OPEN_EDX_FILTERS_CONFIG[_filter_type]['fail_silently'] = _filter_config['fail_silently'] # noqa: F405
295-
else:
296-
OPEN_EDX_FILTERS_CONFIG[_filter_type] = _filter_config # noqa: F405
297-
298284
if ENABLE_THIRD_PARTY_AUTH:
299285
AUTHENTICATION_BACKENDS = _YAML_TOKENS.get('THIRD_PARTY_AUTH_BACKENDS', [
300286
'social_core.backends.google.GoogleOAuth2',

requirements/constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ django-stubs<6
4242
# The team that owns this package will manually bump this package rather than having it pulled in automatically.
4343
# This is to allow them to better control its deployment and to do it in a process that works better
4444
# for them.
45-
edx-enterprise==8.0.9
45+
edx-enterprise==8.0.11
4646

4747
# Date: 2023-07-26
4848
# Our legacy Sass code is incompatible with anything except this ancient libsass version.

requirements/edx/base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ edx-drf-extensions==10.6.0
473473
# edxval
474474
# enterprise-integrated-channels
475475
# openedx-learning
476-
edx-enterprise==8.0.9
476+
edx-enterprise==8.0.11
477477
# via
478478
# -c requirements/constraints.txt
479479
# -r requirements/edx/kernel.in

requirements/edx/development.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ edx-drf-extensions==10.6.0
747747
# edxval
748748
# enterprise-integrated-channels
749749
# openedx-learning
750-
edx-enterprise==8.0.9
750+
edx-enterprise==8.0.11
751751
# via
752752
# -c requirements/constraints.txt
753753
# -r requirements/edx/doc.txt

requirements/edx/doc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ edx-drf-extensions==10.6.0
557557
# edxval
558558
# enterprise-integrated-channels
559559
# openedx-learning
560-
edx-enterprise==8.0.9
560+
edx-enterprise==8.0.11
561561
# via
562562
# -c requirements/constraints.txt
563563
# -r requirements/edx/base.txt

requirements/edx/testing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ edx-drf-extensions==10.6.0
578578
# edxval
579579
# enterprise-integrated-channels
580580
# openedx-learning
581-
edx-enterprise==8.0.9
581+
edx-enterprise==8.0.11
582582
# via
583583
# -c requirements/constraints.txt
584584
# -r requirements/edx/base.txt

0 commit comments

Comments
 (0)