Skip to content

fix: backport billing-only settings access to 5.0#8090

Merged
Dhruwang merged 1 commit into
release/5.0from
cursor/backport-8053-release-5-0-0d39
May 21, 2026
Merged

fix: backport billing-only settings access to 5.0#8090
Dhruwang merged 1 commit into
release/5.0from
cursor/backport-8053-release-5-0-0d39

Conversation

@jobenjada
Copy link
Copy Markdown
Member

@jobenjada jobenjada commented May 21, 2026

What does this PR do?

Backports #8053 to release/5.0.

Enforces billing-role settings restrictions server-side so billing users are redirected to the billing settings page on Cloud and the enterprise settings page on self-hosted deployments. It also guards direct URL access to restricted organization/account settings pages and aligns the sidebar disabled state for Feedback Directories with other inaccessible settings entries.

Related: ENG-982

How should this be tested?

  • pnpm exec eslint "apps/web/app/(app)/workspaces/[workspaceId]/components/SettingsSidebarContent.tsx" "apps/web/app/(app)/workspaces/[workspaceId]/settings/account/layout.tsx" "apps/web/app/(app)/workspaces/[workspaceId]/settings/lib/redirect-billing-role.test.ts" "apps/web/app/(app)/workspaces/[workspaceId]/settings/lib/redirect-billing-role.ts" "apps/web/app/(app)/workspaces/[workspaceId]/settings/organization/api-keys/page.tsx" "apps/web/app/(app)/workspaces/[workspaceId]/settings/organization/billing/page.tsx" "apps/web/app/(app)/workspaces/[workspaceId]/settings/organization/domain/page.tsx" "apps/web/app/(app)/workspaces/[workspaceId]/settings/organization/enterprise/page.tsx" "apps/web/app/(app)/workspaces/[workspaceId]/settings/organization/feedback-directories/page.tsx" "apps/web/app/(app)/workspaces/[workspaceId]/settings/organization/general/page.tsx" "apps/web/app/(app)/workspaces/[workspaceId]/settings/organization/teams/page.tsx" "apps/web/app/(app)/workspaces/[workspaceId]/settings/page.tsx"
  • pnpm --filter @formbricks/web exec vitest run "app/(app)/workspaces/[workspaceId]/settings/lib/redirect-billing-role.test.ts"
  • Manual regression from fix: enforce billing-only settings access #8053:
    • Verify as billing role on Cloud: restricted settings URLs redirect to /settings/organization/billing.
    • Verify as billing role on self-hosted: restricted settings URLs redirect to /settings/organization/enterprise.
    • Verify owners/managers retain access to organization/account settings pages.

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read How we Code at Formbricks
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand bits
  • Ran pnpm build
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues
  • First PR at Formbricks? Please sign the CLA! Without it we wont be able to merge it 🙏

Appreciated

  • If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Formbricks Docs if changes were necessary
Open in Web Open in Cursor 

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Johannes <jobenjada@users.noreply.github.com>
(cherry picked from commit c0bf2ab)
@jobenjada jobenjada marked this pull request as ready for review May 21, 2026 07:14
@jobenjada jobenjada requested a review from Dhruwang May 21, 2026 07:14
@sonarqubecloud
Copy link
Copy Markdown

@Dhruwang Dhruwang merged commit f7890ea into release/5.0 May 21, 2026
14 checks passed
@Dhruwang Dhruwang deleted the cursor/backport-8053-release-5-0-0d39 branch May 21, 2026 07:32
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