Commit Graph

64363 Commits

Author SHA1 Message Date
Maneesh Shukla
94bbfaebe4 settings: Make stream and group settings thead sticky.
Co-authored-by: Karl Stolley <karl@zulip.com>
2025-04-16 09:24:37 -07:00
Sahil Batra
d34bdf8af5 users: Fix comment for base_bulk_get_user_queryset.
We no longer fetch can_access_all_users_group using
select_related after #34356.
2025-04-16 09:02:45 -07:00
Tim Abbott
c39c984993 Release Zulip Server 10.2. 2025-04-15 18:28:16 -07:00
Mateusz Mandera
57d77e0a55 realm_creation: Disable open realm creation if no password backend. 2025-04-15 18:28:16 -07:00
Mateusz Mandera
de37ab28a8 signup: Don't run password_strength form validator in ldap signup mode.
When an ldap user is signing up via the registration form, they are
required to enter their ldap password. This is in contract to "regular"
password signup, where the user sets the password for their new account.

Checking password strength makes sense in the latter case, but not in the
ldap case - the password is already set at the ldap level after all.

In any case, the password_strength validator is not even added to the
form field with `id="ldap-password"`, so this was bugged throwing errors
such as

```
TypeError: $.validator.methods[method] is undefined. Exception occurred when checking element ldap-password, check the 'password_strength' method. at http://localhost:9991/webpack/vendors-node_modules_pnpm_jquery-validation_1_21_0_jquery_3_7_1_node_modules_jquery-validatio-b912f7.js:810
at check .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:803
at element .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:510
at onfocusout .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:310
at delegate .pnpm/jquery-validation@1.21.0_jquery@3.7.1/node_modules/jquery-validation/dist/jquery.validate.js:441
at dispatch .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:5145
at ../node_modules/.pnpm/jquery jquery/dist/jquery.js?1d73/</add/elemData.handle@http://localhost:9991/webpack/vendors-node_modules_pnpm_error-stack-parser_2_1_4_node_modules_error-stack-parser_error-stac-967546.js:16502
at trigger .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:8629
at simulate .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:8698
at focusMappedHandler .pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js:5574
```

when interacting with the form.
2025-04-15 18:28:16 -07:00
Mateusz Mandera
c4bb6509dd signup: Prevent unauthorized signup for realms without EmailAuthBackend.
Zulip supports a configuration where account creation is limited solely
by being able to authenticate with a single-sign on authentication
backend, such as Google Authentication, SAML, or LDAP (i.e., the
organization places no restrictions on email address domains or
invitations being required to join, but has disabled the
EmailAuthBackend that is used for email/password authentication).

A bug in the Zulip server meant that Zulip allowed users to create an
account in such organizations by confirming their email address, without
having an account with the SSO authentication backend.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2025-04-15 18:28:16 -07:00
Ritwik
2429157498 streams: Don't glue translated strings in new channel notification.
We now translate the whole notification message instead of substituting
an already translated policy_name. This avoids scenarios where only part
of the notification message is translated.

Fixes #30212.

Co-authored-by: Tanmay Kumar <tnmdotkr@gmail.com>
2025-04-15 16:28:38 -07:00
Ritwik
187a008f13 streams: Modify get_stream_permission_policy_name to return dict key.
This is a prep commit for #30212. It will allow us to compare the key
and not translated policy name.

Co-authored-by: Tanmay Kumar <tnmdotkr@gmail.com>
2025-04-15 16:28:38 -07:00
opmkumar
8482a9480b email: Apply message content visibility settings to digest too.
Fixes #33190.
2025-04-15 16:24:59 -07:00
opmkumar
8c556cafbb email: Update "Log in" string in digest emails. 2025-04-15 16:24:59 -07:00
opmkumar
5530981db9 email: Update message content disabled wording for missed messages.
This commit updates the wording used in missed messages emails
when message content is disabled.
The corresonding help URL included in the email has also
been updated.
2025-04-15 16:24:59 -07:00
opmkumar
ec81c027fc digest: Pass length of hot_conversations to enough_traffic function.
Previously, `hot_conversations` was incorrectly passed as a string to the
`enough_traffic` function. This commit fixes the issue by passing the length
of `hot_conversations` as a parameter instead.
2025-04-15 16:24:59 -07:00
Anders Kaseorg
c40bd39a01 webpack: Disable cross-origin-header-check middleware.
This middleware in webpack-dev-server 5.2.1 appears to be intended to
plug some undisclosed browser-specific vulnerability that allows
stealing code from closed-source projects.

https://github.com/webpack/webpack-dev-server/issues/5446#issuecomment-2768816082
https://github.com/webpack/webpack-dev-server/issues/5446#issuecomment-2772150109

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-15 16:18:06 -07:00
Anders Kaseorg
0f2f795fe0 Revert "webpack: Use CORS requests for stylesheets."
This reverts commit bdd11577bf (#34359).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-04-15 16:18:06 -07:00
Maneesh Shukla
7ff6460d4b meta-tag: Remove invalid space in viewport meta tag.
This commit removes a trailing space in the viewport meta tag, which was
causing a browser warning:
“Viewport argument key "" not recognized and ignored.”
2025-04-15 16:09:55 -07:00
Kartikay5849
3c450074d4 banner: Prevent duplicate desktop notification banners.
Avoids multiple copies of the desktop notification banner being
added to the DOM. Appends the banner only if it doesn't already
exist.
2025-04-15 16:09:09 -07:00
Shubham Padia
b813d868a7 help-beta: Merge lists of same type adjacent to each other.
Fixes #31252.
One of our major use cases for file imports is to have bullet points as
partials to import at different places in the project. But when
importing the file with Astro, it creates its own lists. So we merge
lists together if they have nothing but whitespace between them.
There were some talks to use a component called FlattenList that would
flatten the list inside it, but that would also flatten lists that were
nested on purpose. This approach while feeling a bit hacky would not
flatten nested lists.
2025-04-15 13:55:09 -07:00
Shubham Padia
c0a2b2a31d help-beta: Convert our custom file import syntax to astro.
We use all these markdown files in `include` only to import them into
our main help markdown files. Most of these files are bulleted lists of
text. When importing these files, they might appear as an indented
sublist of an existing list. We plan to introduce mechanism to flatten
it in further commits.
2025-04-15 13:55:09 -07:00
Shubham Padia
1982aae0fc help-beta: Remove deleted page from sidebar config.
I haven't done a pass for the new pages, that should be done when the
actual transition happens.
2025-04-15 13:55:09 -07:00
Alex Vandiver
826c643401 tusd: Update development version.
This update was missed in 21eff33875.
2025-04-15 10:36:18 -07:00
Kislay Verma
54be18d430 streams: Change text in notification bot DM.
This commit addresses the second bullet in
zulip#31206 (comment).
2025-04-15 10:35:59 -07:00
bedo
c0a9ca8e9a tests: Pass update_fields to all stream.save().
A prep PR to 34308.

Explicitly pass the fields to be updated,
This increases performance but most importantly
prevents overwriting the db-saved value of
"subscriber_count" field (added in an upcoming PR)
with the in-memory default value of 0,
since "subscriber_count" will only be updted
via the db.

Migrate some tests to use do_ functions instead of
direclty modifying the state.
2025-04-15 10:28:18 -07:00
Sahil Batra
4f80823191 settings: Fix opening settings for guests who cannot access all users.
Opening settings and stream settings UI was not working for guests
if they could not access all users. This was because is_person_active
did not handle inaccessible users correctly, if they were not added in
the users data, when being called in get_group_members to render
group pills.
2025-04-14 11:44:11 -07:00
Sahil Batra
3739081792 typeahead: Fix typeahead showing for disabled inputs.
When user cannot type in the input, because of contenteditable
being set to "false", typeahead should not be shown when clicking
on the input element.
2025-04-14 09:24:53 -07:00
Sahil Batra
722d501107 streams: Don't show confirmation modal if user can subscribe.
Previously, we showed confirmation modal when user was unsubscribing
themselves from the private stream from "Unsubscribe" button in
subscribers list, even when user had the permission to subscribe
to the stream again.

This commit fixes it to not show the confirmation modal if user
has permission to subscribe again. We already have same behavior
when user tries to unsubscribe from the button present at the
right of tabs.
2025-04-14 09:24:53 -07:00
Sahil Batra
d3c06234e2 streams: Fix warning shown when unsubscribing from private stream.
We no longer archive the stream when private stream becomes
vacant, so removed that part from the warning.

When a private stream becomes vacant, everyone in the organization
can lose content access to it if no one has permission to subscribe
themselves or others to the stream. So, the warning is updated to
mention this.
2025-04-14 09:24:53 -07:00
bedo
51dab09c69 doc: Add an error explanation in schema migrations.
It wasn't clear enough the stated cause behind the following error:

"django.db.utils.OperationalError:
cannot ALTER TABLE "table_name" because it has pending trigger events"

So I add the detailed cause.
2025-04-14 09:10:34 -07:00
aditya.chaudhary1558@gmail.com
2e59bb0768 empty-feed: Show special banner if muted topics in channel.
If we're in the feed for a channel and it is visibly empty
because all of the messages are in topics that have been
muted by the user, we now show an empty narrow banner that
informs the user about why the feed is empty, how to view
muted topics and links to the help center article on muting
and unmuting topics.

If the channel feed is empty and there are no messages in
muted topics, then we show the default empty narrow banner.

Fixes #31601.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2025-04-13 20:32:11 -07:00
Harsh
f2b33fc3ee compose: Add banner when topic is moved and recipient is updated.
This commit adds the INFO compose banner for new channel/topic when the
recipient is updated when topic is moved.

fixes: #33445.
2025-04-13 20:29:58 -07:00
Sayam Samal
3701c99b0a popup_banners: Update connection error banner label.
This commit updates the connection error banner label to
"Unable to connect to Zulip. Trying to reconnect soon…" when the user
manually retries the connection via the "Try now" button and when the
retry time is less than 5 seconds. And updates the countdown label of
the same banner to "Unable to connect to Zulip. Trying to reconnect in
{retry_delay_secs} seconds…".
2025-04-13 20:25:01 -07:00
Tim Abbott
70e36ef16a help: Document copy-pasting LaTeX.
Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/.E2.9C.94.20.F0.9F.93.82.20pasting.20LaTeX/near/2129200.

Co-authored-by: Apoorva Pendse <apoorvavpendse@gmail.com>
2025-04-13 20:24:27 -07:00
Vector73
b3efb901fc tools: Use .md extension for temporary API changelog files. 2025-04-13 20:22:53 -07:00
Shubham Padia
349e88adc6 settings: Exclude nobody from channel and group settings typeahead.
We have filtered the group in the get_user_groups argument of
set_up_pill_typeahead. We could have done it in `set_up_combined` but
that would have made that function non-generic and specific to these two
settings. We could also have filtered it in get_all_realm_user_groups by
adding an argument on whether to exclude it or not, but that would have
been very hard to read and track. This seemed like the better of the
options we had.

Fixes https://chat.zulip.org/#narrow/channel/9-issues/topic/.22Nobody.22.20group.20in.20UI.20to.20add.20subscribers.2Fgroup.20members
2025-04-13 20:22:26 -07:00
Sahil Batra
c5b005833c groups: Do not prefetch can_access_all_users_group setting.
This commit updates code to not prefetch can_access_all_users_group
and can_access_all_users_group__named_user_group fields using
select_related. We can just use get_realm_system_groups_name_dict
function to check if setting is set to "Everyone" group when
needed and can avoid unnecessarily fetching groups for every user
query.
2025-04-11 17:37:06 -07:00
Sahil Batra
7e77100433 users: Remove unused variable in get_user_dicts_in_realm. 2025-04-11 17:37:06 -07:00
Sahil Batra
7ebea853be user_groups: Refactor user_has_permission_for_group_setting.
This commit refactors user_has_permission_for_group_setting
to accept setting group ID instead of UserGroup object.

We only need ID in checking the permission and this helps in
further commit to avoid prefetching can_access_all_users_group
setting.
2025-04-11 17:37:06 -07:00
Jitendra Kumar
8682db5573 message_feed UI: Update logo dimensions for better scalability.
Change 'z' logo dimensions so that it scales according to chosen font
size.

Fix: #34266
2025-04-11 17:02:08 -07:00
Prakhar Pratyush
68b7deac72 messages: Clarify comment on zerver_message_edit_history_id idx.
This commit removes a misleading comment regarding
'zerver_message_edit_history_id' index.

We added the index in 0679 to use in 0680 but later the 0680 migration
was reworked resulting in the index not being used in 0680.

We didn't drop the index as we expect it to be helpful for other
things.

The comment was misleading hence removed.
2025-04-11 12:38:11 -07:00
Alex Vandiver
e1aa8b1cb0 tusd: Use GCS upload backend when the endpoint matches.
This works around tus/tusd#322, which in turn is caused by
aws/aws-sdk-go-v2#1816.  This requires separate authentication via
service account key.

Fixes: #34186.
2025-04-11 12:16:03 -07:00
Alex Vandiver
cf51013bb7 tusd: Reject tusd terminations after we insert them into our database.
The tusd protocol allows DELETE requests ("terminations") at any
point, including after a file has successfully been uploaded.  This
can allow tusd to remove a file from the bucket, out from under Zulip.

We use the new-in-2.7.0 pre-terminate hook to look up the file which
the client is requesting to terminate, and reject the termination if
it is a file that the Zulip database is already aware of.
2025-04-11 12:13:07 -07:00
Alex Vandiver
21eff33875 puppet: Upgrade tusd to 2.8.0. 2025-04-11 12:13:07 -07:00
Karl Stolley
c24d935f7c left_sidebar: Keep filter box from touching highlihted edge. 2025-04-11 12:08:00 -07:00
Karl Stolley
faa56e5f67 left_sidebar: Remove unnecessary high-specifity selectors.
These were introduced in #34340, but removing them does not seem
to affect sidebar display--and it also restores the specifity of
selectors for hiding the grouping brackets in the zoomed-in view.
2025-04-11 12:08:00 -07:00
Karl Stolley
1025fd559e left_sidebar: Correct stale #filter-topic-input refs. 2025-04-11 12:08:00 -07:00
Alex Vandiver
309876796e kandra: Add a couple useful command-line tools. 2025-04-11 11:25:58 -07:00
Alya Abbott
f4a337c656 contributor docs: Update info on icons in the help center. 2025-04-11 11:21:52 -07:00
Aman Agrawal
cd439c0232 message_overlay: Fix restore tooltips detached with message content.
To avoid restore tooltip of message from being displayed outside
the overlay, we define a boundary, outside which the tooltip
cannot exist. Popper library is smart enough to render the tooltip
correctly by respecting the provided boundary and flipping the
tooltip placement if required.
2025-04-11 10:40:35 -07:00
Alex Vandiver
b11cbbab01 smokescreen: Move metrics port from the default 9810, to 4760.
This prevents errors if Smokescreen is running on a host with more
than 10 Tornado shards.
2025-04-11 10:29:26 -07:00
evykassirer
8d57bf30ac settings: Split CSS for two-pane-overlay and settings.
No changes, just shuffling things around for ease of reading
future commits.
2025-04-11 10:27:25 -07:00
evykassirer
3be4951e5e subscriptions: Move 40% width to just the left style block.
This is overwritten to ~60% in the .right style block and
shouldn't be in the shared style block.
2025-04-11 10:27:25 -07:00