Commit Graph

20457 Commits

Author SHA1 Message Date
Alex Vandiver
a0e5be7f2e register_remote_server: Be more explicit about example.com emails. 2025-10-06 22:20:01 -07:00
Alex Vandiver
fc42c70346 register_remote_server: Explain why we're validating the domain. 2025-10-06 22:20:01 -07:00
Tim Abbott
9361a3cffe test_classes: Give useful error when using /json/ URLs wrong. 2025-10-03 15:49:20 -07:00
Tim Abbott
981fd35288 test_channel_creation: Fix misuse of test helper APIs.
This mix of authentication and endpoints used here was incoherent, and
throws an exception following the next commit.
2025-10-03 15:49:20 -07:00
Niloth P
1f4267f3e0 integrations: Add screenshot configs for monitoring integrations.
that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
d70b099644 integrations: Add screenshot configs for productivity integrations.
that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
433f43a9b4 integrations: Add screenshot configs for communication integrations.
that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
f5e925b26b integrations: Add screenshot configs for the project management type.
of integrations that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
24eab61ab0 integrations: Add screenshot configs for deployment integrations.
that do not have fixtures.
2025-10-03 15:38:03 -07:00
Niloth P
7f2161bffa integrations: Add screenshot configs for fixtureless CI integrations. 2025-10-03 15:38:03 -07:00
Niloth P
65d01b553b integrations: Add screenshot configs for fixtureless VCS integrations.
Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-10-03 15:38:03 -07:00
Niloth P
23a8e26741 integrations: Load optional fields for fixtureless screenshot configs.
The hardcoded content (topic and message) for the screenshot configs are
loaded from `fixtureless_integrations.py`. Add a new
FIXTURELESS_SCREENSHOT_CONFIG_OPTIONAL_FIELDS dict to maintain the
optional fields of fixtureless screenshot configs, and load both into
FIXTURELESS_SCREENSHOT_CONFIG.

This commit does not set any screenshot configs, but only adds the
framework.
2025-10-03 15:38:03 -07:00
Niloth P
c7a6fcaf88 integrations: Add new file for fixtureless screenshot configs registry.
This does not include any screenshot configs, just defining the format,
and loading FIXTURELESS_SCREENSHOT_CONFIG from the file.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-10-03 15:38:03 -07:00
Anders Kaseorg
890ccec8d4 timestamp: Use localized formatting in format_datetime_to_string.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-03 10:43:16 -07:00
Anders Kaseorg
9ca788cbbc update_subscriber_counts: Fix annotate usage.
Commit 7f3bb4523c (#36160) broke this.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-03 00:01:44 -07:00
Anders Kaseorg
b742ab18f9 emoji: Remove setting for deprecated Google blobs emoji set.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-10-01 13:35:06 -07:00
Aman Agrawal
024559e1b9 email_notifications: Convert datetime to local date string. 2025-10-01 11:25:00 -07:00
Aman Agrawal
a694fe1865 signals: Extract function to convert datetime to readable string. 2025-10-01 11:25:00 -07:00
Alex Vandiver
755cb7d854 export: Move all queries, when possible, to iterators.
This reduces overall memory usage for large exports.
2025-10-01 11:21:34 -07:00
Alex Vandiver
0ffc0e810c export_search: Switch to using orjson_stream. 2025-10-01 11:21:34 -07:00
Alex Vandiver
67743d150a export: Support streaming iterators when writing JSON. 2025-10-01 11:21:34 -07:00
Alex Vandiver
78bc17ecbe export: Switch chunked() to the itertools.batched definition.
We only require Python 3.10, so we cannot use `itertools.batched`
directly, which came in 3.12.  Include and use a short version of it.
2025-10-01 11:21:34 -07:00
Alex Vandiver
cf33119348 export: Remove export-most-recent symlink.
The only callsite of do_export_realm calls `rmtree` on the output
path, which means this symlink is always dangling.  Since realms can
also be exported by end-users, following it would always be a race
condition, anyways.

Remove it.
2025-10-01 11:21:34 -07:00
Alex Vandiver
6a8deb7115 export: We expect that zerver_client is written late.
This silences a misleading warning; the behaviour changed in
f2024ad625.
2025-10-01 11:21:34 -07:00
Alex Vandiver
d17851a3ed openapi: Remove a debugging statement. 2025-10-01 11:21:34 -07:00
Alex Vandiver
bea7d6ff93 cache_helpers: Use iterators, so we do not keep the full list in memory. 2025-10-01 10:36:37 -07:00
Lauryn Menard
6fb19fdd2d templates: Add rel-canonical link to some documentation pages.
Updates templates/zerver/meta_tags.html to add a rel-canonical
link if REL_CANONICAL_LINK is in the template context dict.

We add REL_CANONICAL_LINK to the documentation context for the
API and integrations documentation pages in all cases. The link
will be self-referencing for the main zulip.com site.

For policies documentation pages, we add REL_CANONICAL_LINK to
the context only when settings.CORPORATE_ENABLED is true, so
that self-hosted servers' policies documentation do not have a
rel-canonical link set.

Part of #35110.
2025-10-01 11:50:59 -04:00
Anders Kaseorg
c1a4dcf33d requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Anders Kaseorg
7f3bb4523c update_subscriber_counts: Fix union typing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Anders Kaseorg
2eb2d5b6de user_groups: Fix union typing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Anders Kaseorg
33b8eabd9f message_flags: Fix type error.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Anders Kaseorg
3ba68e7847 test_auth_backends: Fix _LDAPUser type errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Anders Kaseorg
1d694aeff4 mypy: Fix no-redef errors from django-stubs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Anders Kaseorg
f24a0a6b81 ruff: Fix RUF059 Unpacked variable is never used.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Anders Kaseorg
fa4d680851 ruff: Fix PYI059 Generic[] should always be the last base class.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Anders Kaseorg
e9abaacd5c ruff: Fix PYI061 Use None rather than Literal[None].
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-30 16:47:54 -07:00
Lauryn Menard
06daab7174 api-docs: Add realm_can_delete_any_message_group content access note.
Users in this user group must also have content access to the message
in order to permanently delete it.
2025-09-29 11:06:40 -07:00
Lauryn Menard
b7815d9e2a api-docs: Update delete-messages description for current permissions.
Prior to feature level 281, the only users who had permissions to
permanently delete any message in the organization were organization
administrators.

Currently, various realm and channel permission settings, which use
the user group model, determine if a user is able to permanently
delete a specific message.

Updates the main description of the endpoint to note these settings
and removes the note that the endpoint is limited to organization
administrators.
2025-09-29 11:06:40 -07:00
Shubham Padia
c3fbe00eb0 help: Add default page to display on /help when help server is off.
We've copied the button and error colors from portico_signin.css. We did
not want the new HTML file to depend on portico_signin.css since they
are unrelated. In addition, having those colors diverge over time might
not be an issue.

We make the raw mode work with /help and /help/ both.

See https://chat.zulip.org/#narrow/channel/19-documentation/topic/edits.20not.20appearing.20with.20vagrant/near/2257442

Co-authored-by: Alya Abbott <alya@zulip.com>
2025-09-26 11:41:10 -07:00
Alex Vandiver
3538455ca8 email_mirror: Drop missed-message emails which are autogenerated.
Emails to missed-message email addressees which are marked
"auto-replied" are clearly auto-replies, and will not contribute
usefully to the conversation.  We also ignore "auto-generated" emails
to missed-message addresses, as they must actually be auto-replies
which are misclassifying themselves, as missed-message addresses are
not meant to be targets for any auto-generated emails.

We accept auto-generated and auto-replied emails to stream incoming
email addresses, as auto-generated emails to those are clearly useful,
and auto-replied emails are unexpected enough to allow (given that
Zulip does not produce outgoing emails From: stream email addresses).
2025-09-26 09:18:13 -07:00
Aman Agrawal
40f4ad2cb0 register: Add AI/LLM as option for how user found Zulip. 2025-09-24 10:24:23 -07:00
Aman Agrawal
c6bf35b392 registration: Use a loop to set extra content value. 2025-09-24 10:24:23 -07:00
Sahil Batra
de5a78344a user_groups: Remove unnecessary select_related.
There is no need for 'select_related("usergroup_ptr")' in queries
for NamedUserGroup table because Django always does a join against
base UserGroup table.
2025-09-23 12:15:53 -07:00
Sahil Batra
764f4aa2e0 groups: Use realm_for_sharding for limiting NamedUserGroup queries.
For get and filter queries of NamedUserGroup, realm_for_sharding
field is used instead of realm field, as directly using
realm_for_sharding field on NamedUserGroup makes the query faster
than using realm present on the base UserGroup table.
2025-09-23 12:15:53 -07:00
Sahil Batra
d4d7a8fe2a streams: Make sure that unused anonymous groups are not created.
Anonymous groups were being created for stream permission
settings when calling the subscriptions endpoint without
any streams data or when calling it only for subscribing
users to streams and not for creating any new streams.

This commit makes sure that no such unused anonymous groups
are created.
2025-09-23 12:15:51 -07:00
Sahil Batra
1e21f7b224 register: Rename stream_creator_or_nobody to channel_creator.
This commit renames `stream_creator_or_nobody` value for
`default_group_name` field in `server_supported_permission_settings`
object to `channel_creator`.
2025-09-23 12:12:23 -07:00
Sahil Batra
8c7628fbc4 openapi: Improve description for default_group_name field.
This commit updates the description for `default_group_name`
field in `server_supported_permission_settings` object to
clearly mention that `stream_creator_or_nobody` is one of
the possible values and explain its meaning.
2025-09-23 12:04:07 -07:00
Sahil Batra
a9afe1becf openapi: Improve description for channel creator.
This commit updates description for channel creator field
`creator_id` to mention that it can be null for channels
created during realm creation.
2025-09-23 12:04:07 -07:00
Prakhar Pratyush
d78f338916 event_queue: Add compatibility code for push_device_registered_user_ids.
In #35965 we added `push_device_registered_user_ids` to message &
update_message event.

Zulip servers with such events in their event queues when upgraded
to the new version set push_device_registered_user_ids to empty list,
which is incorrect - it leads to no push notification sent.

This commit adds compatibility code to handle such events. The newly
introduced `push_device_registered` check is used only for events
with `push_device_registered_user_id` present in them.
2025-09-19 09:19:36 -07:00
Alex Vandiver
3064939ff7 email_mirror_server: chown the logfile before dropping privileges.
This prevents the logger from failing due to an old, root-owned,
logfile already existing.
2025-09-18 09:04:08 -07:00