feat: permission action to assume plugin roles#1972
Conversation
WalkthroughThis PR adds RBAC policy action support for plugin roles by introducing a new constant prefix and a helper function to format plugin role invocation actions in the policy module. ChangesPlugin Role Action Support
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Benchstat (Other)Base: 📊 3 minor regression(s) (all within 5% threshold)
Full benchstat output |
Benchstat (RLS)Base: 📊 3 minor regression(s) (all within 5% threshold)
✅ 8 improvement(s)
Full benchstat output |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rbac/policy/policy.go`:
- Around line 275-277: The NewPluginRoleAction function currently returns
"plugin-role:<plugin>:<role>" which omits the invoke namespace; change its
construction to include the invoke prefix so it produces
"invoke:plugin-role:<plugin>:<role>" (i.e., prepend ActionInvokePrefix before
ActionPluginRolePrefix when formatting the action string in
NewPluginRoleAction).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 89ea3995-8f4e-421e-bcc7-4a1e17fd29ca
📒 Files selected for processing (1)
rbac/policy/policy.go
Gavel resultsGavel exited with code . |
Summary by CodeRabbit