feat(rbac): add Role-Based Access Control to pulp_npm - #414
Conversation
3971090 to
2b040a9
Compare
2b040a9 to
8681ff7
Compare
There was a problem hiding this comment.
Updated review — all three issues from the original review have been addressed. CI is green.
Fixes verified
-
queryset_filtering_required_permissionadded toNpmPackageViewSet— content listing is now properly scoped by RBAC. -
NpmPingViewnow usespermission_classes = [AccessPolicyFromDB]withauthentication_classes = []andprincipal: "*"— clean, consistent with how other plugins handle public endpoints. Newtest_ping_unauthenticatedvalidates it with a raw HTTP request. -
Content scoping test now syncs actual content via a local fixture server, verifies the sync produced content, then validates that scoping filters by repository viewer permission. The test properly checks that granting an object-level viewer role makes content visible.
-
Typo fixed.
LGTM — the access policies, locked roles, model permissions, conditions, post_migrate signal, settings, and tests all follow pulpcore patterns correctly. Comprehensive test coverage across CRUD, sync, cross-object permissions, role management, version delegation, content scoping, object-level scoping, and unauthenticated ping access.
7a2a928 to
a683f03
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a683f03 to
74ece3f
Compare
Enable fine-grained permission enforcement across all npm resources. Users can now be assigned creator, owner, or viewer roles on repositories, remotes, and distributions, with object-level scoping and cross-object permission checks.
fixes #387
📜 Checklist
See: Pull Request Walkthrough