Commit Graph

56046 Commits

Author SHA1 Message Date
Tim Abbott 880133295e zilencer: Skip deactivating registrations when locally deleted.
This protects us from incorrectly handling situations where someone
tested and upgrade to 8.0 for a backup on a separate hostname, and
left the test system live while upgrading the main system, in a way
that results in duplicate RemoteRealm objects that are all marked as
locally deleted.

Further word is required to figure out how to avoid the original
duplication problem.
2024-01-04 18:31:16 -08:00
Tim Abbott 41eb6d947c zilencer: Clean up realms return structure.
It seems most correct to answer the question about whether push
notifications are working specifically for the exact set of realms
that the server self-reported to us in fact exist.

Sending data on any additional realms that were not referenced in the
request (if that's somehow possible without them being locally
deleted) is likely to only be confusing.

And the client should reasonably be able to expect to get a response
covering exactly the realms it told us about.
2024-01-04 18:31:16 -08:00
Tim Abbott 2436df6fa6 zilencer: Don't migrate plans with sponsorship pending. 2024-01-04 18:31:16 -08:00
Tim Abbott 219df72d07 billing: Require no realm plans when approving server sponsorship. 2024-01-04 18:31:16 -08:00
Alex Vandiver 511cc4d8f7 management: Provide a way to deactivate the push registration. 2024-01-04 15:34:28 -08:00
evykassirer 4e66e8742f rows: Convert module to typescript. 2024-01-04 12:45:42 -08:00
evykassirer e3e0125092 rows: Throw exception instead of returning NaN.
We don't expect this to happen, and we don't want
to try to maintain the difficult task of gracefully
handling errors that we don't expect to happen
anyways. This will also make the conversion
to typescript easier.
2024-01-04 12:45:42 -08:00
evykassirer 17bc9af106 message edit: Select message id before getting row.
Getting the row was sometimes causing errors because
the row wasn't in the DOM at the time of trying to
get it. By selecting the message id first, we ensure
it's in the DOM before we call `get_row`.

More conversation here:
https://chat.zulip.org/#narrow/stream/464-kandra-js-errors/topic/Error.3A.20Caller.20should.20pass.20in.20a.20single.20row.2E
2024-01-04 12:45:42 -08:00
Alya Abbott 2a57aa6cea billing: Improve display of sponsorship requests. 2024-01-04 12:25:30 -08:00
N-Shar-ma 48d0d49fde compose: Clear stream id when prompting user for stream selection.
Now we clear the stream id from the compose state on opening the stream
selection dropdown when no stream is specified.

This fixes the bug where the compose box placeholder text would refer to
the previously selected stream, even when the open stream dropdown had
no stream selected.
2024-01-04 10:59:36 -08:00
Joydeep Bhattacharjee e3744627ac
css: Fix the color of alert word in dark theme.
This was incorrectly not declared as a theme-dependant color.

Fixes #28407.
2024-01-04 10:53:14 -08:00
Alex Vandiver bd38e6cb69 send_email: Distinct emails means distinct, case-insensitively. 2024-01-04 10:46:53 -08:00
Alex Vandiver 8d9ead0f6d send_custom_email: Order by delivery_email if necessary.
If we `.distinct("delivery_email")` then we must also
`.order_by("delivery_email")`; adc987dc43 added the `.order_by`
call, which broke the newsletter codepath, since it did not contain
the `delivery_email` in the ordering fields.

Add a flag to distinct on emails in `send_custom_email`.
2024-01-04 10:46:53 -08:00
Alex Vandiver 0697247d59 send_custom_email: Send to recently-active plus owners and admins.
The set of `enable_marketing_emails=True` are those that have opted
into getting marketing newsletter emails -- but we previously limited
further to only those users active in the last month.

Broaden that to "opted in, and either recently active or an owner or
an admin," with the goal of providing information to folks who may
have tried out Zulip in the past.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2024-01-04 10:46:53 -08:00
Karl Stolley 131c24b390 docs: Add warning about failed provisioning on macOS.
Fixes: #28370
2024-01-04 10:29:57 -08:00
Karl Stolley 0c8730a723 portico: Correct spacing at footer bottom.
This reduces reliance on margin for layout, preventing undesired
space appearing below the footer and better using flexbox to align
elements in the legal area.
2024-01-04 10:26:36 -08:00
Prakhar Pratyush c4330be2b1 user_topics: Validate 'topic' parameter length <= max_topic_length.
Earlier, 'topic' parameter length for
'/users/me/subscriptions/muted_topics' and '/user_topics' endpoints
were not validated before DB operations which resulted in exception:
'DataError: value too long for type character varying(60)'.

This commit adds validation for the topic name length to be
capped at 'max_topic_length' characters.

The doc is updated to suggest clients that the topic name should
have a maximum length of 'max_topic_length'.

Fixes #27796.
2024-01-04 09:43:27 -08:00
Mateusz Mandera 75212e7ded docs: Add tiny note about Keycloak URL format in SAML doc.
That specific piece of the instructions makes it sound like /auth/ is
surely supposed to be there in the URL. But newer versions of Keycloak
don't have it - so mention that explicitly, not to create a wrong
expectation.
2024-01-04 09:39:03 -08:00
Alya Abbott fe2d7a92b2 help: Document self-hosted plan discounts in more detail. 2024-01-03 14:52:45 -08:00
Lauryn Menard b4b44e5558 support: Display remote realm is deactivated fields.
Also updates populate_billing_realms to not locally deactivate
test remote realms when generating them.
2024-01-03 14:40:11 -08:00
evykassirer 434b67caf5 message_feed_top_notices: Convert module to typescript. 2024-01-03 14:39:26 -08:00
Tim Abbott 337b0023db e2e-tests: Remove stale comment.
This was incorrectly not removed in
6e725fb3c3.
2024-01-03 13:59:21 -08:00
Lauryn Menard 4143101637 remote-activity: Display latest audit log update for remote server.
Since the latest end time for reported active users on a remote
server is not used to determine if a remote server has current
data for billing purposes, we instead display the last audit log
update datetime for the remote server object.

Removes the note in the remote activity key about the Zulip
version.

Also adds a sum in the total row for mobile push notifications
sent.
2024-01-03 12:15:35 -08:00
Lauryn Menard 2e7715e522 remote-activity: Format no mobile push data as zero for remote server. 2024-01-03 12:15:35 -08:00
Sahil Batra 9197a2c3e2 user_pill: Add support to not allow adding inaccessible users manually.
We previously allowed adding pills for inaccessible user by typing
the email manually. This commit updates it to handle inaccessible
users like we handle invalid emails.
2024-01-03 11:04:35 -08:00
Sahil Batra ede88191a8 input_pill: Define a type for pill_config object. 2024-01-03 11:04:35 -08:00
Lauryn Menard 67e77ad370 integrations: Simplify instruction for generating incoming webhook URL.
As the help center article now has detailed instructions to generate
an incoming webhook URL, the integration documentation only needs to
link to that information.
2024-01-03 10:47:39 -08:00
evykassirer cd9a479a7e narrow_banner: Convert module to typescript. 2024-01-03 10:28:10 -08:00
evykassirer 08bee0f180 message flags: Convert module to typescript. 2024-01-02 16:48:45 -08:00
evykassirer a87b1d5ad8 filter: Use terms instead of operands.
Operand is a confusing name because this
data structure has an attribute *called*
operand. This commit renames references to
this structure to "term", short for "search
term".
2024-01-02 16:24:53 -08:00
Alya Abbott 2732da2bb2 settings: Update description text in Settings > Topics panel. 2024-01-02 15:54:48 -08:00
Lauryn Menard ea1da738d6 support: Update how remote server information is organized.
Changes the emoji that highlights when a remote realm or server has
an active discount.

Adds a remote server UUID field to the remote server information.

Moves the 'has remote realms' field to be after the Zulip version
information, and adds an extra break there to visually highlight
that field as well as the following 'max monthly messages' field.
2024-01-02 13:16:35 -08:00
Lauryn Menard b9ca60ab9e support: Add date created field to remove server information.
Removes the last updated field and replaces it with the date the
remote server was created based on the audit log data.
2024-01-02 13:16:35 -08:00
Prakhar Pratyush a03f9078e5 test_stripe: Add migrate customer from server to realms E2E test. 2024-01-02 11:20:56 -08:00
Mateusz Mandera 367d552052 billing: Improve make_end_of_cycle_... interactions with audit logs.
- Make `self.write_to_audit_log` support a `background_update:
  bool=False` parameter that can be passed when code that might have an
  acting user happens to trigger a background update.
- Make `make_end_of_cycle_updates_if_needed` pass that parameter for its
  direct audit log writes.
- Audit code that `make_end_of_cycle_updates_if_needed` calls and make
  sure those write audit logs this way too.
- Pass the user in the `billing_page` code that had to avoid it as a
  workaround:
```
    # BUG: This should pass the acting_user; this is just working
    # around that make_end_of_cycle_updates_if_needed doesn't do audit
    # logging not using the session user properly.
    billing_session = RealmBillingSession(user=None, realm=user.realm)
```
2024-01-02 10:59:05 -08:00
evykassirer c0719e0285 pm_list_data: Convert module to typescript. 2024-01-02 10:27:02 -08:00
Lauryn Menard 481828e556 support: Exclude deactivated servers from search results. 2024-01-02 07:51:50 -08:00
Anders Kaseorg 06d439e0b2 typing_events: Fix early read of page_params.
For spectators,
page_params.server_typing_started_expiry_period_milliseconds has not
been initialized yet at module load time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:39:10 -08:00
Anders Kaseorg 45c8dcc9c3 typing: Fix early read of page_params.
For spectators,
page_params.server_typing_started_wait_period_milliseconds and
page_params.server_typing_stopped_wait_period_milliseconds have not
been initialized yet at module load time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:39:10 -08:00
Anders Kaseorg 80432c8c06 stream_create: Fix early read of page_params.
For spectators, page_params.realm_create_public_stream_policy,
page_params.server_web_public_streams_enabled,
page_params.realm_enable_spectator_access have not been initialized
yet at module load time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:39:10 -08:00
Anders Kaseorg 8f069ac1d8 settings_profile_fields: Fix early read of page_params.
For spectators, page_params.custom_profile_field_types has not been
initialized yet at module load time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:39:10 -08:00
Anders Kaseorg 88f0d6e710 docs: Fix reference to page_params.mandatory_topics.
Commit 64041e0da1 (#4628) renamed this.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:37:50 -08:00
Anders Kaseorg 8066405d9b tests: Fix incorrect reference to page_params.sent_by_me.
Commit 24a1f7b792 (#23056) introduced
this mistake; it has never existed.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:37:50 -08:00
Anders Kaseorg 2a69545bec page_params: Move initial_pointer and friends to message_fetch.
These aren’t sent by the server; they’re client-side global variables.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:37:50 -08:00
Anders Kaseorg e8e7142ed1 page_params: Move events_queue_expired to server_events.
This isn’t sent by the server; it’s a client-side global variable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-01 17:37:50 -08:00
Mateusz Mandera bc8167db2a docs: Fix typo in mypy doc. 2024-01-01 17:36:13 -08:00
Lauryn Menard 9f009a2e63 support: Reformat percentages in attach discount success message. 2023-12-30 11:22:30 -08:00
Lauryn Menard ffd708ecaf support: Display next plan data on remote support view.
Currently, this will only be the case for legacy self-managed plans
that have scheduled a switch to either the Basic or Business plan.
2023-12-30 11:22:02 -08:00
Sahil Batra 8f795e22e8 settings: Fix discard button in groups UI in dark theme. 2023-12-30 11:15:30 -08:00
Prakhar Pratyush 1472aac750 docs: Update the URL for Stripe docs to install Stripe CLI locally. 2023-12-30 11:15:06 -08:00