Repository navigation
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the change consolidating team-based package authorization queries.
No open issues 🎉
What changed in this PR
This PR reduces database queries for team-based package read authorization in cnpmcore while preserving administrator and team membership checks.
Changes:
- Combine package lookup and team-binding detection into one query, selecting only fields needed for authorization.
- Update read authorization to use the combined lookup and construct the package name for error messages.
- Remove the separate team-binding existence query.
| File | Description |
|---|---|
app/repository/TeamRepository.ts |
Remove the unused hasAnyTeamBinding method. |
app/repository/PackageRepository.ts |
Add a minimal-field lookup for team-bound packages. |
app/port/UserRoleManager.ts |
Use the combined lookup while retaining existing access checks. |
Review effort: Balanced
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1204 +/- ##
==========================================
- Coverage 94.51% 94.37% -0.15%
==========================================
Files 213 213
Lines 9110 9112 +2
Branches 1814 1814
==========================================
- Hits 8610 8599 -11
- Misses 500 513 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Verification
EXPLAINshowed indexed lookups on both tables.