feat: add CoursewareViewRedirectURL pipeline steps#2548
Conversation
67893ef to
a539335
Compare
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (62.06%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #2548 +/- ##
==========================================
- Coverage 86.04% 86.00% -0.04%
==========================================
Files 250 251 +1
Lines 16700 16740 +40
Branches 1657 1662 +5
==========================================
+ Hits 14369 14397 +28
- Misses 1997 2008 +11
- Partials 334 335 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b279908 to
fcd378f
Compare
fcd378f to
e6bff04
Compare
a0204dc to
e885e65
Compare
bbe88aa to
44259b7
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces new openedx-filters pipeline steps in enterprise and consent to enforce enterprise-specific courseware access gating (enterprise start-date messaging, active-enterprise mismatch blocking, and data-sharing consent redirects/blocks), and adds unit tests to validate the new behaviors.
Changes:
- Added Enterprise courseware filter steps for start-date override errors and active-enterprise mismatch access denial.
- Added Consent courseware filter steps plus helper logic to compute enterprise consent redirect URLs / access blocks.
- Added/expanded tests covering new enterprise/consent helpers and courseware filter pipeline steps.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_enterprise/test_utils.py | Adds tests for get_active_enterprise_customer_user. |
| tests/test_consent/test_helpers.py | Adds unit tests for consent helper behavior and URL building. |
| tests/test_consent/test_filters_courseware.py | Adds tests for consent courseware filter steps (redirect + access denial). |
| tests/filters/test_courseware.py | Adds tests for enterprise courseware filter steps (start-date override + active enterprise check). |
| enterprise/utils.py | Adds get_active_enterprise_customer_user and enterprise_learner_enrolled. |
| enterprise/settings/common.py | Registers enterprise courseware pipeline steps in filters config. |
| enterprise/filters/dashboard.py | Updates migration-related comment wording. |
| enterprise/filters/courseware.py | Adds enterprise courseware pipeline steps. |
| consent/settings/common.py | Registers consent courseware pipeline steps in filters config. |
| consent/helpers.py | Adds consent enforcement logic and consent URL builder helpers. |
| consent/filters/courseware.py | Adds consent courseware pipeline steps. |
| consent/filters/init.py | Adds package docstring for consent filter steps. |
6baf4f0 to
f5652be
Compare
f5652be to
e1de1e3
Compare
This commit replaces most enterprise-specific logic serving the purpose of conditionally blocking courseware access. Enterprise steps added: - EnterpriseStartDateAccessFailureStep supplies an enterprise-specific start-date error for enterprise learners. - ActiveEnterpriseCheckStep denies access when the learner's active EnterpriseCustomer differs from the enrollment's customer. Consent steps added: - DataSharingConsentRedirectStep supplies a redirect URL to collect data sharing consent when it is required. - DataSharingConsentCourseAccessStep denies access when consent is required. ENT-11544
e1de1e3 to
1ae72db
Compare
This commit replaces most enterprise-specific logic serving the purpose
of conditionally blocking courseware access.
Enterprise steps added:
Consent steps added:
ENT-11544
Blocked by:
Blocks: