Skip to content

refactor: move SearchOrganizationInvoices to FrontierService#1549

Open
paanSinghCoder wants to merge 1 commit intomainfrom
refactor/search-org-invoices-to-frontier-service
Open

refactor: move SearchOrganizationInvoices to FrontierService#1549
paanSinghCoder wants to merge 1 commit intomainfrom
refactor/search-org-invoices-to-frontier-service

Conversation

@paanSinghCoder
Copy link
Copy Markdown
Contributor

Summary

  • Move `SearchOrganizationInvoices` RPC from `AdminService` → `FrontierService` so org admins (not only platform superusers) can list their own org's invoices.
  • Bump `PROTON_COMMIT` to pick up the proto move from refactor(frontier): move SearchOrganizationInvoices to FrontierService proton#476.
  • `authorization.go`: `IsSuperUser` → `IsAuthorized(org, UpdatePermission)` (matches the gate on `FrontierService/ListInvoices`). Superusers still pass via the standard interceptor bypass.
  • Regenerated `proto/v1beta1` via `make proto`.
  • Admin dashboard: swapped `AdminServiceQueries.searchOrganizationInvoices` → `FrontierServiceQueries.searchOrganizationInvoices`. Request/response shape is unchanged, so no other UI edits needed.

Dependency

Depends on raystack/proton#476 merging so the new `@raystack/proton` prerelease gets auto-published to npm. After that PR merges, `web/sdk/package.json` needs its `@raystack/proton` pin bumped to the new `0.1.0-` version before the TS build will pass.

Test plan

  • `go build ./...` passes locally
  • CI go tests green
  • After proton#476 merges + npm publish + sdk version bump: `make admin-app` passes
  • Smoke test: call `/raystack.frontier.v1beta1.FrontierService/SearchOrganizationInvoices` as (a) an org admin, (b) a superuser, (c) an unrelated user — expect success, success, PermissionDenied

🤖 Generated with Claude Code

Move the RPC from AdminService to FrontierService so org admins (not only
platform superusers) can list their own org's invoices. Matches the gate
pattern already used by FrontierService/ListInvoices (UpdatePermission on
the org namespace). Superusers still pass via the standard interceptor
bypass.

- Bump PROTON_COMMIT to pick up the proto move (raystack/proton#476).
- Regenerate proto/v1beta1 via `make proto`.
- Swap authorization.go entry from IsSuperUser to IsAuthorized(org, UpdatePermission).
- Switch the admin dashboard frontend from AdminServiceQueries to
  FrontierServiceQueries; request/response shape is unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Apr 17, 2026 11:14am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 17, 2026

Warning

Rate limit exceeded

@paanSinghCoder has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 51 minutes and 8 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 51 minutes and 8 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 87aa527c-32df-4c0a-a891-5c7e359828b8

📥 Commits

Reviewing files that changed from the base of the PR and between a8a19f3 and 15065a8.

⛔ Files ignored due to path filters (4)
  • proto/v1beta1/admin.pb.go is excluded by !**/*.pb.go, !proto/**
  • proto/v1beta1/frontier.pb.go is excluded by !**/*.pb.go, !proto/**
  • proto/v1beta1/frontierv1beta1connect/admin.connect.go is excluded by !proto/**
  • proto/v1beta1/frontierv1beta1connect/frontier.connect.go is excluded by !proto/**
📒 Files selected for processing (3)
  • Makefile
  • pkg/server/connect_interceptors/authorization.go
  • web/sdk/admin/views/organizations/details/invoices/index.tsx

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coveralls
Copy link
Copy Markdown

Coverage Report for CI Build 24562198985

Coverage decreased (-0.001%) to 41.807%

Details

  • Coverage decreased (-0.001%) from the base build.
  • Patch coverage: 4 uncovered changes across 1 file (0 of 4 lines covered, 0.0%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
pkg/server/connect_interceptors/authorization.go 4 0 0.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 36927
Covered Lines: 15438
Line Coverage: 41.81%
Coverage Strength: 11.82 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants