feat: [programs API] replace enterprise dependency with plugin hook - #39030
Open
pwnage101 wants to merge 1 commit into
Open
feat: [programs API] replace enterprise dependency with plugin hook#39030pwnage101 wants to merge 1 commit into
pwnage101 wants to merge 1 commit into
Conversation
The programs API has two variants: B2C and B2B:
- B2C: `GET /api/dashboard/v1/programs/`
- B2B: `GET /api/dashboard/v1/programs/{enterprise_uuid}/`
The B2B variant uses enterprise internal functions to help filter the
response to include only enterprise-subsidized enrollments. This can't
go on any longer because we need to remove all enterprise imports from
the platform.
This commit replaces those enterprise function calls with a plugin hook
point. We introduce the `OVERRIDE_PROGRAMS_GET_ENTERPRISE_COURSE_IDS`
pluggable override which allows the enterprise plugin itself register an
implementation, allowing all `enterprise` imports to be removed from the
programs API views.py file.
ENT-11575
pwnage101
force-pushed
the
pwnage101/ENT-11575
branch
from
August 26, 2026 21:20
2aa7e37 to
f0ebfed
Compare
pwnage101
marked this pull request as ready for review
August 26, 2026 21:20
pwnage101
enabled auto-merge
August 26, 2026 21:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The programs API has two variants: B2C and B2B:
GET /api/dashboard/v1/programs/GET /api/dashboard/v1/programs/{enterprise_uuid}/The B2B variant uses enterprise internal functions to help filter the response to include only enterprise-subsidized enrollments. This can't go on any longer because we need to remove all enterprise imports from the platform.
This commit replaces those enterprise function calls with a plugin hook point. We introduce the
OVERRIDE_PROGRAMS_GET_ENTERPRISE_COURSE_IDSpluggable override which allows the enterprise plugin itself register an implementation, allowing allenterpriseimports to be removed from the programs API views.py file.ENT-11575
For comparison, here's the PR on thee 2U side: edx#439