Commit Graph

60706 Commits

Author SHA1 Message Date
Anders Kaseorg 97ffccb45f reload: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-18 15:31:41 -07:00
Anders Kaseorg 0be5cc232c reload: Remove obsolete location.reload(true) usage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-18 15:31:41 -07:00
Anders Kaseorg 16d37eb80a tests: Call reload.is_stale_refresh_token correctly.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-18 15:31:41 -07:00
Karl Stolley c3b13654a7 left_sidebar: Ensure brackets are not shown while zoomed in. 2024-09-18 15:29:20 -07:00
Sahil Batra 5f3a8334be user_groups: Do not allow deleting user groups. 2024-09-18 13:41:13 -07:00
Sahil Batra 6a739e263f user_groups: Allow deactivating groups from webapp. 2024-09-18 13:41:13 -07:00
Sahil Batra c53563d0e7 user_groups: Handle deactivated groups in webapp. 2024-09-18 13:41:13 -07:00
Sahil Batra 5c790aac72 user_groups: Rename allow_deactivated in 'GET /user_groups'.
This commit renames "allow_deactivated" parameter in
"GET /user_groups" endpoint to "include_deactivated_groups", so
that we can have consistent naming here and for client capability
used for deciding whether to send deactivated groups in register
response and how to handle the related events.
2024-09-18 13:41:13 -07:00
Sahil Batra fb63c47ea6 user_groups: Add client capability to handle deactivated groups.
This commit adds a client capability to not receive data about
deactivated groups.
2024-09-18 13:41:13 -07:00
Sahil Batra aa123b38b4 tests: Test can_manage_group setting for deactivating groups.
There were no tests for testing group deactivation permission
based on can_manage_group setting.
2024-09-18 13:41:13 -07:00
Anders Kaseorg 782fa2a803 localstorage: Fix removeDataRegexWithCondition to check parsed data.
Commit bca41fd29f (#23028) introduced
this for reload.is_stale_refresh_token, which had always returned true
because it was operating on the raw JSON string rather than the parsed
data.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-18 13:16:25 -07:00
evykassirer dba1af84e0 filter: Use stream id instead of stream name. 2024-09-18 13:08:14 -07:00
evykassirer 2be181c367 stream_data: Check for null more explicitly.
Otherwise 0 is treated specially, different from other numbers.
2024-09-18 13:08:14 -07:00
evykassirer 2ad1dc7014 stream_data: Make slug regex a bit more readable.
This clarifies that the second group is purely for use internal
to the regexp (it's there for the ? to act on) and won't be saved
as a substring for the surrounding code to look at (like match[2]).
In a hot path that could be a performance savings; here it just
makes things a bit more explicit for the reader.
2024-09-18 13:08:14 -07:00
Sahil Batra 7a6135371e settings: Handle guests separately for group-based settings.
This commit adds code to handle guests separately for group
based settings, where guest will only have permission if
that particular setting can be set to "role:everyone" group
even if the guest user is part of the group which is used
for that setting. This is to make sure that guests do not
get permissions for actions that we generally do not want
guests to have.

Currently the guests do not have permission for most of them
except for "Who can delete any message", where guest could
delete a message if the setting was set to a user defined
group with guest being its member. But this commit still
update the code to use the new function for all the settings
as we want to have a consistent pattern of how to check whether
a user has permission for group-based settings.
2024-09-18 11:51:11 -07:00
sujal shah fcbb1cd558 todo_widget: Add `type`` as Optional in `new_task_inbound_data_schema`.
This commit corrects the `type` parameter in
`new_task_inbound_data_schema`, which was previously optional
but not added as such.
2024-09-18 10:06:00 -07:00
Lauryn Menard 2e394f3913 billing: Check minimum for plan tier for stale license count check. 2024-09-18 09:40:42 -07:00
kartikay b49f227b6e docs: Correct zulipbot label in accessibility documentation.
Earlier, the documentation incorrectly stated the label as
"area: accessibility". The correct label is "accessibility".

This commit updates the label in "docs/subsystems/accessibility.md"
to ensure proper usage for contributors.
2024-09-17 16:26:32 -07:00
evykassirer 13e3ced486 message edit: Fix bug preventing messages from being edited.
More context in this thread on CZO:
https://chat.zulip.org/#narrow/stream/9-issues/topic/Blueslip.20error.20on.20editing.20a.20message/near/1943476
2024-09-17 15:50:33 -07:00
Alex Vandiver c34913b4d7 nginx: Limit access to internal endpoints, to localhost. 2024-09-17 12:51:30 -07:00
Alex Vandiver 5bc4d39c25 settings: Attempt to detect S3_REGION if left blank. 2024-09-17 12:51:30 -07:00
Alex Vandiver 9a1f78db22 thumbnail: Support checking for images from streaming sources.
We may not always have trivial access to all of the bytes of the
uploaded file -- for instance, if the file was uploaded previously, or
by some other process.  Downloading the entire image in order to check
its headers is an inefficient use of time and bandwidth.

Adjust `maybe_thumbnail` and dependencies to potentially take a
`pyvips.Source` which supports streaming data from S3 or disk.  This
allows making the ImageAttachment row, if deemed appropriate, based on
only a few KB of data, and not the entire image.
2024-09-17 12:51:30 -07:00
Alex Vandiver 758aa36cbe stop-server: Stop katex, if running. 2024-09-17 12:51:30 -07:00
Karl Stolley 708d07a885 lightbox: Address edge case where media may be unavailable. 2024-09-17 11:55:18 -07:00
Karl Stolley ead6f29200 lightbox: Restore centered media list. 2024-09-17 11:55:18 -07:00
Lauryn Menard 52bc47a870 activity: Add view for a remote server's audit logs.
Links to the audit log view via the remote support view in the
remote server information section after the user counts.
2024-09-17 09:34:17 -07:00
Aman Agrawal ed0104ceb9 installation_activity: Show extra data for `Other` referrer. 2024-09-17 09:15:14 -07:00
Alex Vandiver ef21dd9b99 thumbnail: Set a stable ordering on ImageAttachment rows for locking.
Failure to have a stable ordering can lead to deadlocks.
2024-09-17 09:14:52 -07:00
Aman Agrawal 5e084a2128 message_view: Fix load_local_messages called without superset_data.
This was missed in the migration that happend in #31326.

Fixes error when pressing `Home` button in message list.
2024-09-17 09:14:36 -07:00
Sahil Batra ccddbba7a3 user_groups: Extract code to check system groups allowed for setting. 2024-09-16 16:28:52 -07:00
Sahil Batra 5fda195eab user_groups: Refactor function to get groups to be used for settings.
This commit refactors the code to get groups to be used for settings
as we would now have two UIs for settings for some time - dropdown
widget and pills, so we can just have a single function which just
returns the valid UserGroup objects and then a separate function to
get the appropriate format to be used for dropdown widgets and pills.
2024-09-16 16:28:52 -07:00
Sahil Batra 6482f0c2ea user_groups: Pass correct group object for adding new group to UI.
We previously passed the UserGroupRaw type object received in
the user group creation event to user_group_edit.add_group_to_table
instead of the UserGroup type object.

The add_group_to_table function is called after receiving creation
event only, but other functions called later in the flow are called
at other times as well like when opening edit panel for a particular
group and they expect UserGroup type object, so this commit fixes it.
2024-09-16 16:28:52 -07:00
Sahil Batra f3fafc719f settings: Add function to check permission for anonymous setting group. 2024-09-16 16:28:52 -07:00
Sahil Batra ffeb542b22 settings_components: Remove unnecessary toString calls.
The value for which the toString is called is already a string, so
there is no need to call it. It would have been added to make sure
that linter does not complain, so added an assert statement for it.
2024-09-16 16:28:52 -07:00
Prakhar Pratyush 764083d31b settings: Add 'allow_private_data_export' user setting.
This commit adds a user-setting to allow users to decide
whether to let administrators export their private data.

Fixes part of #31201.
2024-09-16 15:48:40 -07:00
Aarya Patil fb888ba9ab docs: Update typing indicators documentation.
Update typing_indicators.md to reflect current implementation.

Fixes #30665.
2024-09-16 15:48:14 -07:00
Alya Abbott a16a8d5f00 portico: Update CTA button on the home page. 2024-09-16 15:44:46 -07:00
Alya Abbott 20b9003e32 portico: Update home page title. 2024-09-16 15:44:46 -07:00
Alex Dehnert 30c2d65809 docs: Mention Debian as a supported distro
According to the production requirements page, Debian (not just Ubuntu) is a supported OS, so the dependencies page should also reflect that.
2024-09-16 15:44:19 -07:00
Karl Stolley da91ebc592 checkboxes: Render border-color-matched SVGs in light and dark modes.
This obviates the need for the buggy use of a brightness filter,
which causes rendering problems on iOS devices and possibly others.
2024-09-16 15:43:47 -07:00
Karl Stolley 8741c9e43f dark_mode: Introduce higher-contrast, opaque text.
Fixes: #31615
2024-09-16 15:43:47 -07:00
Sayam Samal b8d4bddacf echo: Fix handling of `locally_echoed` flag after successful msg resend.
The `on_success` function within `echo.resend_message` is executed when
the server successfully acknowledges a resent message. In this scenario,
the `locally_echoed` flag should be set to false, as the message has
been confirmed by the server.

This behavior is already correctly handled within the
`echo.reify_message_id()` function, which is triggered through the
`compose.send_message_success()` flow.

However, the on_success function incorrectly sets the `locally_echoed`
flag to true, which is unnecessary and likely a mistake. This led to
the bug where message controls would disappear from the resent messages
on slow networks.

This commit removes the erroneous line to ensure proper flag handling
during message resend.
2024-09-16 13:06:30 -07:00
Sayam Samal 5583ddd3bf echo: Update message controls dynamically for failed messages.
Previously, the message controls for failed messages was present for
all messages, regardless of their status, and was being rendered
unconditionally; only being hidden for successfully sent messages.

This commit adds dynamic rendering for the failed message controls,
only rendering them via the handlebars template when a message is
confirmed to be failed.

Fixes #31132.
2024-09-16 13:06:30 -07:00
Lauryn Menard e67ed2e704 billing: Clarify guest licenses documentation on Zulip Cloud. 2024-09-16 12:38:21 -07:00
Lauryn Menard bc8993f159 user-groups: Add helper for date_created comparison. 2024-09-16 11:42:55 -07:00
Johan Nilsson bf9cbe30a7 integrations: Add support for release events to GitLab integration. 2024-09-16 09:26:20 -07:00
sujal shah 614caf111e user_groups: Add `creator` and `date_created` field in user groups.
This commit introduced 'creator' and 'date_created'
fields in user groups, allowing users to view who
created the groups and when.

Both fields can be null for groups without creator data.
2024-09-13 18:44:58 -07:00
sujal shah 3b69f2e5d9 stream_settings: Extract `creator_detail` section.
Extract display_pill and date code to separate
'creator_detail.hbs' file.
Rename 'stream_creator_details' to 'creator_details'.
2024-09-13 18:44:58 -07:00
Tim Abbott 3514cbd7e8 renumber-migrations: Avoid crashing with squashed migrations. 2024-09-13 18:44:58 -07:00
opmkumar d4b1d0a68e stream_data: Add can_edit_description function.
Added can_edit_description function in stream_data to check if the user has permission to edit the description of the stream.
2024-09-13 15:51:39 -07:00