Repository navigation
[PR #442/6fe0d35a backport][0.10] Allow core.content_labeler to set/unset labels on npm packages - #443
Merged
dkliban merged 1 commit intoOct 13, 2026
Conversation
Setting labels on an npm package content unit returned 403 for every non-superuser, even one holding the core.content_labeler role, because NpmPackageViewSet's access policy had no set_label/unset_label statement for the permission check to ever consult — so no role grant could authorize labeling. Add that statement, gated on core.manage_content_labels, mirroring pulp_rpm and pulp_file. The change is additive: create/upload stay superuser-only (unchanged), so this only closes the labeling gap. Ships with a functional RBAC test (labeler succeeds, viewer-without-role gets 403, admin regression) and a towncrier fragment. Fixes #441 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Bryan ramos <bramos@redhat.com> (cherry picked from commit 6fe0d35)
3 of 4 tasks
dkliban
approved these changes
Oct 13, 2026
dkliban
deleted the
patchback/backports/0.10/6fe0d35aa1bbc9535108515dd664af85c7ada0bc/pr-442
branch
October 13, 2026 18:56
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.
This is a backport of PR #442 as merged into main (6fe0d35).
Setting labels on an npm package content unit returned 403 for every non-superuser, even one holding the core.content_labeler role, because NpmPackageViewSet's access policy had no set_label/unset_label statement for the permission check to ever consult — so no role grant could authorize labeling.
Add that statement, gated on core.manage_content_labels, mirroring pulp_rpm and pulp_file. The change is additive: create/upload stay superuser-only (unchanged), so this only closes the labeling gap. Ships with a functional RBAC test (labeler succeeds, viewer-without-role gets 403, admin regression) and a towncrier fragment.
Fixes #441
📜 Checklist
See: Pull Request Walkthrough