Commit Graph

55667 Commits

Author SHA1 Message Date
Anders Kaseorg 7001a0dfc0 models: Extract zerver.models.groups.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg 45bb8d2580 models: Extract zerver.models.users.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg 37a9c4501f models: Extract zerver.models.constants.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg e601d0ae7c models: Rename zerver/models.py to zerver/models/__init__.py.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg 9d11f2c8fc echo: Update build_display_recipient comment.
Commit c6b3d0212d (#12959) moved the
code it refers to.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Anders Kaseorg 839b04a253 docs: Update example run-dev output.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-16 22:08:44 -08:00
Alex Vandiver 940c2a1ded remote_billing_page: Allow deactivation logins with realm plans. 2023-12-15 14:04:35 -08:00
Alex Vandiver d50e9b5453 version: Update to point to 8.0 blog post. 2023-12-15 13:39:20 -08:00
Anders Kaseorg a37b36ca2b changelog: Fix version number typo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-15 13:21:09 -08:00
Alex Vandiver f1597afb2b send_email: Send emails to remote servers from BILLING_SUPPORT_EMAIL. 2023-12-15 13:15:27 -08:00
Tim Abbott 7b80af61e4 Update version following 8.0 release. 2023-12-15 13:14:29 -08:00
Tim Abbott bc13f0ea37 Release Zulip Server 8.0. 2023-12-15 11:16:19 -08:00
Tim Abbott bbd79120b5 i18n: Update translation data from Transifex. 2023-12-15 11:16:19 -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
Alya Abbott fc9cfc03e6 help: Update Contact support documentation for new paid plans. 2023-12-15 11:03:42 -08:00
Alya Abbott eb2882d464 help: Adjust Zulip Cloud vs. self-hosting help page. 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
Alya Abbott f65478fb1f help: New page to document self-hosted billing. 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
Alex Vandiver 48ee7506ba zilencer: Log the can_push value that we returned. 2023-12-15 11:03:42 -08:00
Sahil Batra 03323b0124 push_notifications: Enforce max user count on self managed plan.
We do not support sending push notifications for realms having
more than 10 users on self managed plan.
2023-12-15 11:03:42 -08:00
Tim Abbott 10862451ef billing: Refactor code to compute push status.
This moves the function which computes can_push and
expected_end_timestamp outside RemoteRealmBillingSession
because we might use this function for RemoteZulipServer
as well and also renames it.
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
Tim Abbott 97799b279b billing: Enable billing system in production. 2023-12-15 11:03:42 -08:00
Aman Agrawal 3aed22dcd0 gear_menu_popover: Enable `Plan management` in production. 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
Mateusz Mandera fb5137f8b5 zilencer: Handle deleted realms nicely at server/analytics. 2023-12-15 09:18:26 -08:00
Alex Vandiver 8102519242 send_email: Remove `List-Unsubscribe-Post` from remote-server emails.
For remote servers, we cannot advertise `List-Unsubscribe=One-Click`,
which is specified in RFC 8058[^1] to mean that the `List-Unsubscribe`
URL supports a POST request with no arguments to unsubscribe.  Because
we show an interstitial and confirmation page, as this is not just a
mailing list which is disabled if you click the link, it does not
support the mail system performing the unsubscribe for the user.

Remove the inaccurate header for remote servers.

[^1]: https://datatracker.ietf.org/doc/html/rfc8058
2023-12-15 09:12:25 -08:00
Aman Agrawal 0fe725fdbd test_stripe: Add tests to check sponsorship approval. 2023-12-15 09:08:48 -08:00
Aman Agrawal 4b5e8971a3 sponsorship_approval: Fix punctuation. 2023-12-15 09:08:48 -08:00
Prakhar Pratyush 1588f49b4f test_stripe: Add end-to-end test for RemoteRealm billing flow. 2023-12-15 09:08:48 -08:00
Prakhar Pratyush 33e04362e1 test_stripe: Add 'billing_session" to StripeTest.
This prep commit adds a 'billing_session' field to StripeTest class.

Creates 'client_billing_get', 'client_billing_post', and
'client_billing_patch' helper functions.

This will help in reusing code for RemoteRealm and
RemoteZulipServer end-to-end tests.
2023-12-15 09:08:48 -08:00
Aman Agrawal 53b7e956ea test_remote_billing: Extract remote server / realm login methods. 2023-12-15 09:08:48 -08:00
evykassirer 1f7b3d7a2d stream edit toggler: Update `select_tab` when changing hash."
This fixes a bug in #26717 where the hash would flash to #personal
before #subscribers. Sometimes `setup_toggler` is called after
the hash change, and it needs to know which tab to show.

Ideally in the future we'd clean up this code so that the hash
changing function isn't called multiple times.
2023-12-15 08:47:45 -08:00
Alex Vandiver 0f2cc383f6 send_email: Support add_context for remote servers.
612f2c73d6 started passing add_context to
`send_custom_server_email`, but did not make it make use of it.

Also add the `hostname` as a built-in value, since that is most likely
the most useful property.
2023-12-15 08:37:02 -08:00
Tim Abbott 63e5712837 push_notifications: Improve logging when not contacting bouncer. 2023-12-15 08:15:36 -08:00
Aman Agrawal f5aa88e165 billing: Don't show current license for legacy plan customers. 2023-12-15 08:10:16 -08:00
Prakhar Pratyush c12a9eeb9c stripe: Fix 'get_billable_licenses_for_customer' not using event_time.
The call to 'get_billable_licenses_for_customer' during the
'sync_license_ledger_if_needed' step should use the audit_log's
event_time while calculating 'current_count_for_billed_licenses'.

Earlier, it used timezone_now(), resulting in the latest user count
recorded corresponding to each audit log.
2023-12-15 08:09:31 -08:00
Mateusz Mandera d351353126 zilencer: Fix server/register failing to check if server is deactivated.
A deactivated server shouldn't be updated like that - we want to return
an error.
2023-12-15 08:06:58 -08:00
Tim Abbott 53f40133eb remote_server: Handle JsonableErrors and connection failures better.
This fixes the exception case on the initial
`/api/v1/remotes/server/analytics/status` case.  Other exceptions from
`send_to_push_bouncer` are allowed to escape.

Co-authored-by: Alex Vandiver <alexmv@zulip.com>
2023-12-14 15:08:52 -08:00
Anders Kaseorg b472d769d1 change_user_role: List role choices in --help output.
Fixes #28227.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-14 15:06:18 -08:00
Evy Kassirer 6e902defba
node tests: Use noop helper function pattern in test files.
Some files already were using `noop` in place of `() => {}`.
It's both clearer what it means and is easier to type.
This updates all test files to fully use `noop`, and
adds a shared import from the test lib file.
2023-12-14 14:51:33 -08:00
Aman Agrawal 11dff6b4d8 zilencer: Add tests for migrating customer from server to realm. 2023-12-14 14:31:28 -08:00