Skip to content

Fix soc2 request plan gate - #3181

Merged
HarshMN2345 merged 2 commits into
mainfrom
fix-soc2-request-plan-gate
Aug 24, 2026
Merged

Fix soc2 request plan gate#3181
HarshMN2345 merged 2 commits into
mainfrom
fix-soc2-request-plan-gate

Conversation

@HarshMN2345

Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@appwrite

appwrite Bot commented Aug 24, 2026

Copy link
Copy Markdown

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

SSR frameworks are fully supported with configurable build runtimes

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR changes the SOC-2 request flow to gate access based on negotiated billing plans and aligns its support submission payload with the existing support form.

  • Adds a shared helper for determining SOC-2 plan support.
  • Shows either the request flow or an Enterprise sales CTA based on the current plan.
  • Migrates the SOC-2 components to Svelte runes and submits requests as multipart form data.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
src/lib/stores/billing.ts Adds a plan helper that identifies negotiated, non-self-service plans as supporting SOC-2 requests.
src/routes/(console)/organization-[organization]/settings/Soc2.svelte Reactively gates the SOC-2 request modal and displays an Enterprise contact CTA for unsupported plans.
src/routes/(console)/organization-[organization]/settings/Soc2Modal.svelte Migrates modal state to Svelte runes and aligns support submissions with the established multipart endpoint contract.

Reviews (3): Last reviewed commit: "fix(billing): key SOC-2 eligibility off ..." | Re-trigger Greptile

@HarshMN2345
HarshMN2345 force-pushed the fix-soc2-request-plan-gate branch from 5508080 to c36aab7 Compare August 24, 2026 06:26
The SOC-2 card rendered for every cloud organization owner, so Free and
Pro users could fill in the whole request form and only learn it was
unavailable from a generic "please try again later" error. BAA, the card
directly above it, has always been gated on `supportedAddons.baa`.

No SOC-2 entitlement exists on the plan model, so infer it: the Scale
group is the lowest one that advertises SOC-2 (the Enterprise column on
the pricing page), and contract plans sit above it. Ineligible
organizations now get a short explanation and an upgrade CTA instead of
a form that cannot succeed, and the modal is no longer mounted for them.

Also send the request as multipart form data, the shape the support
wizard uses. SOC-2 was the last caller posting JSON to growth's
/support: the wizard moved to FormData in e446f7f and the BAA request
modal, the other JSON caller, went away in bf2166b, so if that path
has rotted the request was failing on every plan including Enterprise.
The billing plan now rides along in metaFields so support can see the
tier on the ticket.
D5's answer to the customer in the support thread was explicit: Pro
doesn't include SOC-2, "you need the custom plan" — not Scale. The
previous gate OR'd in `planHasGroup(Scale)`, which was inferred from
planComparisonBox's marketing copy rather than any real entitlement,
and would have wrongly let a self-service Scale org through.

Checked plans.php in the cloud repo: every self-service plan (Pro,
Scale) sets `selfService: true`, and every negotiated Custom/Enterprise
contract plan sets it `false` — `supportedAddons` doesn't distinguish
them for anything SOC-2-shaped (it only carries the paid, self-service
BAA/premiumGeoDB addons). `selfService` is already a real field the
API returns per plan today, so gating on `selfService === false` alone
needs no backend change and matches support's stated policy exactly,
instead of guessing at a group boundary.

Also swapped the ineligible-state CTA from the self-service change-plan
wizard to the existing Enterprise contact-sales link, since there's no
self-service upgrade path onto a plan that actually unlocks this.
@HarshMN2345
HarshMN2345 force-pushed the fix-soc2-request-plan-gate branch from ee2d261 to 96ac9f8 Compare August 24, 2026 06:52
@HarshMN2345
HarshMN2345 merged commit 536e098 into main Aug 24, 2026
4 checks passed
@HarshMN2345
HarshMN2345 deleted the fix-soc2-request-plan-gate branch August 24, 2026 07:14
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