Commit Graph

418 Commits

Author SHA1 Message Date
Anders Kaseorg 125ddf2f79 self-hosting: Fix link to redirect.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-18 16:11:35 -08:00
Aman Agrawal d962814a30 upgrade: Make it possible to upgrade to a provided tier.
Main work is maintaining context during various redirects and
and passing the context to the final upgrade process.
2023-12-18 12:23:46 -08:00
Aman Agrawal 1326619b77 stripe: Provide min license count to template as per tier. 2023-12-18 12:23:46 -08:00
Tim Abbott 1e0339c18b plans: Fix community plan documentation.
It appears the plans page version of this had a less clear/specific
list of example communities than was intended. Also improve the longer
version in the Help Center to give the same examples.
2023-12-17 00:09:06 -08:00
Aman Agrawal 6b1f71872b plans: Fix same page hashtag link.
Fixes /plans fragment links redirecting users to different page.
2023-12-16 22:51:21 -08:00
Alya Abbott 910a8169bc billing: Don't ask about subscriptions when deactivating registration. 2023-12-15 14:04:20 -05:00
Karl Stolley e44ba3b1f1 portico: Add new self-hosted plans.
Co-authored-by: Alya Abbott <alya@zulip.com>
2023-12-15 11:03:42 -08:00
Karl Stolley 92de3d11d2 portico: Add self-hosted plans comparison table.
Co-authored-by: Vlad Korobov <vlad.korobov@zulip.com>
Co-authored-by: Alya Abbott <alya@zulip.com>
2023-12-15 11:03:42 -08:00
Karl Stolley d25c375be9 billing: Show self-hosted help link for licenses. 2023-12-15 11:03:42 -08:00
Karl Stolley 6d48e08ff7 portico: Update modal for canceling scheduled legacy upgrade. 2023-12-15 11:03:42 -08:00
Karl Stolley 5d7010c8a0 billing: Update copy, modal for self-hosted downgrades and trials. 2023-12-15 11:03:42 -08:00
Karl Stolley 356d775d31 billing: Clarify minimum purchase license numbers. 2023-12-15 11:03:42 -08:00
Aman Agrawal b377673190 sponsorship: Add help link redirect for org_type dropdown.
Only visible for self hosted orgs.
2023-12-15 11:03:42 -08:00
Aman Agrawal 8fb126505c sponsorship: Show different discount text for self hosted orgs. 2023-12-15 11:03:42 -08:00
Tim Abbott 9423ccecd4 docs: Document plan management login tips. 2023-12-15 11:03:42 -08:00
Alya Abbott 2090a10aad portico: Remove development environment testing plan. 2023-12-15 11:03:42 -08:00
Tim Abbott ace8344b5a docs: Document manual update_analytics_counts. 2023-12-15 10:13:35 -08:00
Aman Agrawal f5aa88e165 billing: Don't show current license for legacy plan customers. 2023-12-15 08:10:16 -08:00
Alya Abbott ba80084ea7
remote_billing_page: Deny login for server / remote realm.
If server has plan, deny login for realm.
If realm has plan, deny login for server.

Co-authored-by: Aman Agrawal <amanagr@zulip.com>
Co-authored-by: Alya Abbott <alya@zulip.com>
2023-12-14 14:25:12 -08:00
Alya Abbott b8d05aea1b portico: Update count of Tim's daughters on /team page. 2023-12-14 11:33:57 -08:00
Tim Abbott 1757b88760 billing: Offer release announcement subscriptions.
Also avoid prompting for full name time more than once.
Adds TOS version field to Remote server user.

Co-authored-by: Karl Stolley <karl@zulip.com>
Co-authored-by: Aman Agrawal <amanagr@zulip.com>
2023-12-14 10:51:16 -08:00
Aman Agrawal 34a1be80a4 model: Use same name for legacy plan across the app. 2023-12-14 08:22:25 -08:00
Karl Stolley 09c32cbe30 Revert "portico: Disable self-hosted tab for logged-in cloud users."
This reverts commit 857630707a.
2023-12-13 12:23:02 -08:00
Aman Agrawal 039f6af79e billing: Link plan name to /plans page. 2023-12-13 08:13:33 -08:00
Aman Agrawal 998685f2e7 sponsorship: Show sponsored plan name for sponsored orgs.
The `plan_name` is incorrect here since the customer will not
have an active plan for approved sponsorship.
2023-12-13 08:13:33 -08:00
Aman Agrawal 63f4fc51de server_deactivate: Show error message for server on active plan. 2023-12-12 21:00:42 -08:00
Aman Agrawal c2636354a5 remote_billing_login: Show different title for deactivate login. 2023-12-12 21:00:42 -08:00
Aman Agrawal 0d08fe90a8 remote_billing_email_confirm: Minor text changes.
* Move email early in text to reduce change of it wrapping to
  next line.

* Change 2 hours to 24 hours.
2023-12-12 20:32:42 -08:00
Karl Stolley 180dd00d5f portico: Update strings for RemoteRealm login flow. 2023-12-12 20:32:42 -08:00
Lauryn Menard aebafcc43f corporate: Show error page if mobile push data has not been uploaded.
Adds a template that displays an error message when the billing
or upgrade context for a remote server or remote realm raises a
MissingDataError.
2023-12-12 19:36:06 -08:00
Aman Agrawal da74b9ade7 billing: Apply common styles to billing pages. 2023-12-12 17:31:41 -08:00
Karl Stolley 9cc0ded092 portico: Correct layout on deactivation pages. 2023-12-12 17:31:41 -08:00
Karl Stolley 2b879e646c portico: Move billing contact to above payment method. 2023-12-12 16:24:56 -08:00
Mateusz Mandera e515574b3e remote_billing: Add endpoint and a helper to make deactivation links.
This is a general link for logging into the billing system on behalf of
a server, but it's tied to the .contact_email and takes the user
straight to the /deactivate/ page via the next_page mechanism.
2023-12-12 13:31:59 -08:00
Aman Agrawal 2e8aba2e83 billing: Show special success msg for legacy upgrade scheduled server. 2023-12-12 11:45:14 -08:00
Karl Stolley 857630707a portico: Disable self-hosted tab for logged-in cloud users. 2023-12-12 11:30:57 -08:00
Aman Agrawal c61275cab2 upgrade: Show sponsorship requested banner like billing page. 2023-12-12 09:30:17 -08:00
Aman Agrawal cf68f8ae24 legacy_server_logic: Rename id and key variable names.
Rename server_org_id to zulip_org_id.
Rename server_org_secret/server_org_key to zulip_org_key.
2023-12-12 08:05:45 -08:00
Aman Agrawal ab1a8a0151 legacy_server_login: Do better error handling.
Show better error messages and validate zulip_org_id in JS before
sending it to the server and give an appropriate error message.
2023-12-12 08:05:45 -08:00
Aman Agrawal 2da1bfcbd0 remote_billing: Fix strings and styling for remote login pages. 2023-12-11 20:16:37 -08:00
Alya Abbott fd97d87491 help: Update development community stream descriptions. 2023-12-11 11:23:21 -08:00
Karl Stolley 9c66b4a660 portico: Make Cloud tab inactive for self-hosters.
Copy here also points to the Cloud plans as described on zulip.com.
2023-12-11 09:03:00 -08:00
Tim Abbott f78db57c6b corporate: Remove temporary billing scaffolding. 2023-12-10 16:46:39 -08:00
Mateusz Mandera a0ea14bdb1 remote_billing: Fold the separate .ts files into remote_billing_auth.ts.
The separation of files no longer makes any sense, with some of these
forms being used by the RemoteRealm and legacy server flows together.
And in general we don't need to scatter this stuff across files.

Also, the unifying of the class of loader on the buttons, fixes a visual
bug on the final "Confirm login" page where you would see it spinning
for half a second upon loading the page, until the .hide() code
triggered.
2023-12-10 16:15:28 -08:00
Mateusz Mandera 1e6d9d28f8 remote_billing: Fix up templates and HTML names in them.
These pages are generally used by both remoterealm and legacy server
flows, so should have general names.
2023-12-10 16:15:28 -08:00
Mateusz Mandera 423aebf98e remote_billing: Implement confirmation flow for RemoteRealm auth.
The way the flow goes now is this:
1. The user initiaties login via "Billing" in the gear menu.
2. That takes them to `/self-hosted-billing/` (possibly with a
   `next_page` param if we use that for some gear menu options).
3. The server queries the bouncer to give the user a link with a signed
   access token.
4. The user is redirected to that link (on `selfhosting.zulipchat.com`).
Now we have two cases, either the user is logging in for the first time
and already did in the past.
If this is the first time, we have:
5. The user is asked to fill in their email in a form that's shown,
   pre-filled with the value provided inside the signed access token.
   They POST this to the next endpoint.
6. The next endpoint sends a confirmation email to that address and asks
   the user to go check their email.
7. The user clicks the link in their email is taken to the
   from_confirmation endpoint.
8. Their initial RemoteBillingUser is created, a new signed link like in
   (3) is generated and they're transparently taken back to (4),
   where now that they have a RemoteBillingUser, they're handled
   just like a user who already logged in before:
If the user already logged in before, they go straight here:
9. "Confirm login" page - they're shown their information (email and
   full_name), can update
   their full name in the form if they want. They also accept ToS here
   if necessary. They POST this form back to
   the endpoint and finally have a logged in session.
10. They're redirected to billing (or `next_page`) now that they have
    access.
2023-12-10 16:15:28 -08:00
Aman Agrawal e44f3d448d stripe: Use `next_plan` instead of `new_plan` for legacy upgrades. 2023-12-09 12:50:05 -08:00
Aman Agrawal dca7e654ca billing: Enforce min license for plan on upgrade and billing page. 2023-12-09 12:50:05 -08:00
Mateusz Mandera abdfdeffe4 remote_billing: Implement confirmation flow for legacy servers.
For the last form (with Full Name and ToS consent field), this pretty
shamelessly re-uses and directly renders the
corporate/remote_realm_billing_finalize_login_confirmation.html
template. That's probably good in terms of re-use, but calls for a
clean-up commit that will generalize the name of this template and the
classes/ids in the HTML.
2023-12-08 23:49:10 -08:00
Aman Agrawal 12dec4234e billing: Minor adjustments across the billing system.
* Reformat "This is a legacy plan" notice on billing page.
* Add a link to the plan name on upgrade page title.
* Tweak discount style on billing page.
* Add line break to server login page title.
* Match server login page title and tab title.
2023-12-08 11:24:15 -08:00