Skip to content

Commit 7bb9390

Browse files
committed
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
1 parent 03920db commit 7bb9390

7 files changed

Lines changed: 5 additions & 35 deletions

File tree

lms/envs/common.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3281,22 +3281,6 @@ def _should_send_certificate_events(settings):
32813281
# The project ID should be obtained from the Google Cloud Console when creating a reCAPTCHA
32823282
RECAPTCHA_PROJECT_ID = None
32833283

3284-
# .. setting_name: OPEN_EDX_FILTERS_CONFIG
3285-
# .. setting_default: {}
3286-
# .. setting_description: Configuration dict for openedx-filters pipeline steps.
3287-
# Keys are filter type strings; values are dicts with 'fail_silently' (bool) and
3288-
# 'pipeline' (list of dotted-path strings to PipelineStep subclasses).
3289-
OPEN_EDX_FILTERS_CONFIG = {
3290-
"org.openedx.learning.account.settings.read_only_fields.requested.v1": {
3291-
"fail_silently": True,
3292-
"pipeline": ["enterprise.filters.accounts.AccountSettingsReadOnlyFieldsStep"],
3293-
},
3294-
"org.openedx.learning.dashboard.render.started.v1": {
3295-
"fail_silently": False,
3296-
"pipeline": ["enterprise.filters.dashboard.DashboardContextEnricher"],
3297-
},
3298-
}
3299-
33003284
############################## Miscellaneous ###############################
33013285

33023286
# 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
@@ -85,7 +85,6 @@ def get_env_setting(setting):
8585
'EVENT_BUS_PRODUCER_CONFIG',
8686
'DEFAULT_FILE_STORAGE',
8787
'STATICFILES_STORAGE',
88-
'OPEN_EDX_FILTERS_CONFIG',
8988
]
9089
})
9190

@@ -280,19 +279,6 @@ def get_env_setting(setting):
280279
EVENT_TRACKING_SEGMENTIO_EMIT_WHITELIST # noqa: F405
281280
)
282281

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

requirements/constraints.txt

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

4949
# Date: 2023-07-26
5050
# 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
@@ -483,7 +483,7 @@ edx-drf-extensions==10.6.0
483483
# enterprise-integrated-channels
484484
# openedx-authz
485485
# openedx-core
486-
edx-enterprise==8.0.10
486+
edx-enterprise==8.0.11
487487
# via
488488
# -c requirements/constraints.txt
489489
# -r requirements/edx/kernel.in

requirements/edx/development.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ edx-drf-extensions==10.6.0
756756
# enterprise-integrated-channels
757757
# openedx-authz
758758
# openedx-core
759-
edx-enterprise==8.0.10
759+
edx-enterprise==8.0.11
760760
# via
761761
# -c requirements/constraints.txt
762762
# -r requirements/edx/doc.txt

requirements/edx/doc.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ edx-drf-extensions==10.6.0
573573
# enterprise-integrated-channels
574574
# openedx-authz
575575
# openedx-core
576-
edx-enterprise==8.0.10
576+
edx-enterprise==8.0.11
577577
# via
578578
# -c requirements/constraints.txt
579579
# -r requirements/edx/base.txt

requirements/edx/testing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ edx-drf-extensions==10.6.0
589589
# enterprise-integrated-channels
590590
# openedx-authz
591591
# openedx-core
592-
edx-enterprise==8.0.10
592+
edx-enterprise==8.0.11
593593
# via
594594
# -c requirements/constraints.txt
595595
# -r requirements/edx/base.txt

0 commit comments

Comments
 (0)