Skip to content

fix(api): make subscription/plans endpoint public#269

Merged
bllr777 merged 1 commit intomainfrom
fix/plans-endpoint-public
May 9, 2026
Merged

fix(api): make subscription/plans endpoint public#269
bllr777 merged 1 commit intomainfrom
fix/plans-endpoint-public

Conversation

@bllr777
Copy link
Copy Markdown
Collaborator

@bllr777 bllr777 commented May 9, 2026

Summary

Makes GET /api/payments/subscription/plans publicly accessible.

Problem

The endpoint was decorated with [Authorize(Policy = "OrganizationAdminOnly")], causing a 401 Unauthorized when called from the public marketing pricing page (unauthenticated users). The PlanCatalogService subscribes to this endpoint on load for the pricing component.

Change

  • Replace [Authorize(Policy = "OrganizationAdminOnly")] with [AllowAnonymous] on GetSubscriptionPlans

Plan pricing is public information displayed on the marketing site. No org context is required.

Changes:
- Replace [Authorize(Policy = OrganizationAdminOnly)] with [AllowAnonymous]
  on GetSubscriptionPlans so unauthenticated users (e.g. public pricing page)
  can fetch plan prices without a 401

Plan pricing is public information — no org context required.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bllr777 bllr777 merged commit cf3943d into main May 9, 2026
6 checks passed
@bllr777 bllr777 deleted the fix/plans-endpoint-public branch May 9, 2026 15:56
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.

1 participant