Repository navigation
refactor(role): adopt the shared role registry and authkit 0.23 - #269
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
[Medium impact] No identified issue blocks merging. This assessment does not establish that the full test suite passes.
|
…ne registry to every consumer
3b7d545 to
780d76a
Compare
Code Review ✅ Approved🔴 High risk · Moving authorization to the shared role registry lets plugin-declared roles carry manage_users; a mistaken declaration could grant account-management access. Replaces the local role registry with the shared goncierge registry, hands one registry to authkit, the graph, the server capability gate and account commands, and bumps authkit and related dependencies. No issues found. VerificationRules No rules evaluated Functional validation Not enabledFor more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
There was a problem hiding this comment.
Code Health Improved
(4 files improve in Code Health)
Gates Passed
4 Quality Gates Passed
See analysis details in CodeScene
View Improvements
| File | Code Health Impact | Categories Improved |
|---|---|---|
| role_test.go | 9.92 → 10.00 | Bumpy Road Ahead |
| graphql.go | 9.69 → 10.00 | Excess Number of Function Arguments |
| run.go | 8.86 → 8.93 | Bumpy Road Ahead |
| world_test.go | 9.46 → 9.51 | Complex Method, Large Method |
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Part of #251. Supersedes #230 and #232.
What
internal/rolekeeps only the core table:adminandmember, withmanage_usersandmanage_webhooks.coreis refused bymake generateand at start.DeclaredRoles.sdk.RoleDeclarationis nowgoncierge.Role.account:enablerefuses an account holding no role or one nothing declares, on a dry run too.role_unknownand the meta fieldrole, as the HTTP API does.Why
authkit 0.19 and later check invites and admin writes against a role source. AlphOne's own copy of a registry could not be one, so the two dependency bumps failed. The shared registry replaces that copy.
Testing Instructions
GOWORK=off go test -race ./...andmake e2e: every package and scenario passes.alphone account:enableon an account holding no role, or a role nothing declares, is refused, on a dry run too.servewith an error naming the plugin.Summary by CodeRabbit
New Features
<plugin-id>.<name>format.coreidentifier is protected from plugin use.Bug Fixes
Documentation