Repository navigation
refactor(authz): remove the hardcoded catalog - #269
Conversation
|
Thanks for the pull request, @dcoa! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dcoa/catalog-6-team-tables #269 +/- ##
==============================================================
- Coverage 98.98% 98.95% -0.03%
==============================================================
Files 81 78 -3
Lines 1474 1442 -32
Branches 489 474 -15
==============================================================
- Hits 1459 1427 -32
Misses 15 15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
da7dd64 to
826dbd6
Compare
ae05576 to
a5663c9
Compare
a5663c9 to
7422db9
Compare
7422db9 to
017b2f6
Compare
017b2f6 to
8e4c07f
Compare
46a8612 to
3683d22
Compare
3683d22 to
4ff123d
Compare
jacobo-dominguez-wgu
left a comment
There was a problem hiding this comment.
Tested locally and everything works as expected.
2754cc8 to
85ff9cc
Compare
Delete the hardcoded roles, categories and permissions of courses and libraries, the old role and permission types, and CONTENT_*_PERMISSIONS. The team permissions the code checks now live in the authz constants, per scope type: MANAGE_TEAM_ACTIONS next to VIEW_TEAM_ACTIONS, and the validate/me lists built from them. Replace CONTEXT_TYPES with the scope types: getScopeType reads the scope type from a scope key, and the aggregate scope labels are keyed by it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
85ff9cc to
8317f2f
Compare
|
🎉 This PR is included in version 1.0.0-alpha.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Remove the hardcoded course and library catalog now that its consumers use backend catalog data.
CONTENT_*_PERMISSIONSwith sharedVIEW_TEAM_ACTIONSandMANAGE_TEAM_ACTIONS, keyed by scope type.CONTEXT_TYPESandgetScopeContextTypewithSCOPE_TYPESandgetScopeType.course-v1andlib.Authorization checks continue through permission validation; the catalog provides descriptive metadata.
Touches shared permission constants, scope classification, and their consumers across the wizard and tables. Depends on the preceding catalog migrations, including #268.
Evidence
Before: Catalog-backed screens coexist with unused hardcoded definitions, legacy types, and separate context-type identifiers.
After: Consumers use catalog types and a shared scope-type vocabulary. Scope classification remains centralized in
getScopeType.Test instructions
npm run types npm run lint npm test -- --watch=false --runInBandManually verify:
Related tests are updated to use the shared permission actions and scope types.