refactor: move SearchOrganizationTokens to FrontierService#1564
refactor: move SearchOrganizationTokens to FrontierService#1564rohilsurana merged 4 commits intomainfrom
Conversation
Move the RPC from AdminService to FrontierService so org admins (not only platform superusers) can list their own org's token transactions. Matches the FrontierService/ListInvoices gate pattern (UpdatePermission on the org namespace). Superusers still pass via the standard interceptor bypass. - Bump PROTON_COMMIT to pick up the proto move (raystack/proton#482). - Regenerate proto/v1beta1 via make proto. - Swap authorization.go entry from IsSuperUser to IsAuthorized(org, UpdatePermission). - Switch the admin dashboard Tokens page + AddTokensDialog from AdminServiceQueries to FrontierServiceQueries; request/response shape is unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughUpdated Proton commit and bumped Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
Coverage Report for CI Build 24770393682Coverage decreased (-0.001%) to 42.227%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
|
Lint will be fixed after Proton PR is merged raystack/proton#482 |
|
Tests:
|
Updates PROTON_COMMIT to the merge commit of raystack/proton#482 and bumps @raystack/proton npm pin to the same SHA. Regen produces no .pb.go diff since proton branch SHA and proton main merge SHA have identical content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
SearchOrganizationTokensfromAdminServicetoFrontierServiceso org admins and Users both can list their own org's token transactions (previously restricted to platform super-users isIsSuperUsercheck).PROTON_COMMITand regenerateproto/v1beta1.IsSuperUser→IsAuthorized(org, UpdatePermission). Super-users continue to pass via the interceptor bypass.AddTokensDialognow useFrontierServiceQueries.searchOrganizationTokens. Request/response shape is unchanged.Dependency
Depends on raystack/proton#482. After that merges and
@raystack/protonis published, bump the pin inweb/sdk/package.jsonandweb/apps/admin/package.json.Test plan
go build ./...locallyFrontierService/SearchOrganizationTokensas an org admin, a super-user, and an unrelated user — expect success, success, PermissionDenied.🤖 Generated with Claude Code