Commit Graph

61262 Commits

Author SHA1 Message Date
Aman Agrawal 72caf5641e activity: Use the defined function to set `new_user_input` value.
This helps us call additional functions when `new_user_input` value
is modified.
2024-10-21 15:53:28 -07:00
Shubham Padia ad11561d31 user_groups: Add users to members preview list without add button.
This makes the behaviour of this screen similar to the create channel
screen where the user does not need to click `Add` button to add users
to members preview. This follows most of the logic from that flow for
soft removal, syncing between members preview list and the input pills,
etc. The current user will have a pill in this case unlike channel
creation since a user can create a group without them in it.
2024-10-21 15:46:11 -07:00
Aman Agrawal 4768294bc0 navbar: Remove `:visited` color effect on button text.
The `:visited` color effect doesn't look good is not intentional.
2024-10-21 15:44:43 -07:00
Alya Abbott 18dc503865 portico: Add buttons to Why Zulip hero bar. 2024-10-21 15:44:43 -07:00
Alya Abbott ef264efccf help: Improve groups documentation.
Update for recently added functionality.
2024-10-21 15:43:19 -07:00
Shubham Padia 97bd0e6f3f user_groups: Fix incorrect nesting for .pill-container.
5980f4a502 moved the
`group_setting_disabled` class from pill container to its parent input
group without changing the nesting for the other css properties
properly. This commit fixes that.
2024-10-21 15:41:30 -07:00
Prakhar Pratyush aa667f8df1 settings_users: Remove the extra 'list_widget.hard_redraw' call.
For ListWidget, 'replace_list_data' makes a call to 'hard_redraw'
by default. There is no need to make a separate call to 'hard_redraw'
when using 'replace_list_data'.

In 'settings_users.js', we were making that separate call.
This commit removes that extra unnecesssary call.
2024-10-21 15:39:44 -07:00
Aman Agrawal 8aca0a7776 narrow_history: Save narrow state after we have scrolled to the msg.
Saving narrow state before we have scrolled to the message results
in view scroll position being different from where the message
is displayed.
2024-10-21 08:54:14 -07:00
Aman Agrawal b895e9dc6f realm_creation: Let user choose their org type. 2024-10-20 18:17:04 -07:00
Anders Kaseorg 3ec58fd3d5 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-20 18:16:27 -07:00
Anders Kaseorg 5b486a74f5 test_counts: Remove mostly unused assert_table_count helper.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-20 18:16:27 -07:00
Anders Kaseorg 71ca928ec9 ruff: Fix SIM115 Use a context manager for opening files.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-20 18:16:27 -07:00
Anders Kaseorg 10271fb850 ruff: Fix SIM910 Use `.get(key)` instead of `.get(key, None)`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-20 18:16:27 -07:00
Aman Agrawal 1cc9947786 message_events: Don't update msg if we don't have it cached locally.
This fixes a bug where we try to rerender the anchor message even
if we don't have it locally cached which results in error.

The bug was introduced in #31942.
2024-10-18 14:46:59 -07:00
Prakhar Pratyush eaee5763d6 realm_export: Add realm_export_consent feature to API.
Fixes part of #31201.
2024-10-18 14:08:20 -07:00
Sahil Batra 70b6e46516 stream_create: Do not show banner if the current user is subscribed.
There is no need to show the banner if the user creating the channel
is subscribed to it because user will eventually be narrowed to
channel narrow and seeing the banner flash doesn't look good.
2024-10-18 10:20:32 -07:00
Sahil Batra 77c1204d45 stream_create: Remove banner shown on successful API request.
There was a banner showed on channel creation page on successful
completion of the API request, but we do not need that now since
we anyways move to a different UI, either the settings for the
created channel or to the message view narrowed to the new channel.
2024-10-18 10:20:32 -07:00
Alya Abbott 916ddd4832 help: Recommend unsubscribing from muted channels. 2024-10-17 15:54:20 -07:00
Alya Abbott a420169721 help: Document navigating to channel feed for unsubscribed channels. 2024-10-17 15:54:20 -07:00
PieterCK c9375fb5ee storage: Hash system bots avatar files.
This commit makes sure system bots avatar files are hashed when served
as static files. This way, requests for these avatar files will be
served with long-lived caching headers by our nginx (see #22275).

We don't need to worry about stale caches for these files because they
will only be used by system bots.

Fixes #31458.
2024-10-17 15:47:40 -07:00
Tim Abbott 46db52dc96 avatar: Use fixed avatars for system bots.
This makes a Zulip server more isolated than relying on gravatar, and
avoids complex logistics if in the future we move system bots to live
inside individual realms.

Co-authored-by: PieterCK <pieterceka123@gmail.com>
2024-10-17 15:47:17 -07:00
Alya Abbott 98ac036a5d portico: Fix typo. 2024-10-17 14:33:26 -07:00
Alya Abbott 9ab465c689 portico: Make "Get a demo" button easier to find. 2024-10-17 14:33:26 -07:00
Sahil Batra e5043b991a user_groups: Add API support to add subgroups during group creation.
This commit adds support to add subgroups to a group while
creating it.

User can add the subgroups to group irrespective of permissions
like user can add members during creating it.
2024-10-17 14:27:21 -07:00
Sahil Batra 1e818c4708 user_groups: Allow updating subgroups and members using same endpoint.
`POST /user_groups/{user_group_id}/members` now allows updating
subgroups as well.
2024-10-17 14:27:21 -07:00
Sahil Batra 47a611f989 user_groups: Check permission when adding subgroups.
This commit updates code to allow users with permission
to add members to add subgroups as well. And only users
with permission to manage the group can remove subgroups.

Also updated tests to check permissions in separate tests
and removed them from the existing test.
2024-10-17 14:27:21 -07:00
Sahil Batra 30e0c72919 test_user_groups: Remove incorrect comment.
The comment about non-admins and non-moderators who are not
member of the group cannot update subgroups of that group
is not correct since there is no such restriction now after
c9d527603. The test passes because the member user is not
part of can_manage_group or can_manage_all_groups.
2024-10-17 14:27:21 -07:00
Sahil Batra b748623a77 changelog: Fix request method for group members update endpoint.
Members of a user group can be updated using "POST" method for
"/user_groups/{user_group_id}/members" and not "PATCH".
2024-10-17 14:27:21 -07:00
Tim Abbott 010410c849 rocketchat: Validate custom emoji before larger data sets.
This is a data set that's relatively likely to have weird failures,
and also likely to be fairly small.
2024-10-17 12:25:18 -07:00
Tim Abbott 6e4da50577 rocketchat: Complete metadata verification before importing uploads.
This is not the best factored version of this, but it saves effort
changing the tests, and importantly should make failures involving
metadata only take a couple seconds rather than first doing a giant
BSON read before learning about them.
2024-10-17 12:25:18 -07:00
Tim Abbott 79b6f43d0e rocketchat: Move bson_code_options to a global variable.
This will make it a lot easier to only read files in when we actually
need them.
2024-10-17 12:25:18 -07:00
Aman Agrawal b93b05eddd pricing_model: Show `Contact sales` to already upgraded customers.
Customers who are already on a paid / sponsored plan will see
"Contact sales" on other paid plans.
2024-10-17 11:41:43 -07:00
Tim Abbott c4f5cd6552 migrations: Fix unnecessary loop in 0602. 2024-10-17 11:21:56 -07:00
evykassirer 7a53db8498 stream_create: Convert module to typescript. 2024-10-17 10:56:59 -07:00
evykassirer b27ce42f6d stream_create: Don't return anything from create_stream.
The return value is not being used anywhere.
2024-10-17 10:56:59 -07:00
Lauryn Menard fa36c7ffde todo-widget: Add TODO for inbound/outbound data schema refactor. 2024-10-17 10:53:26 -07:00
Sahil Batra fde8b2d2e0 stream_creation: Fix subscriber pills being too long.
The CSS for setting min-width was added in 63a7c9061b
to set the width of pill containers used for group
settings, but that also applied to pill containers of
subscribers in stream creation form.

This commit updates the CSS to be applied only for
settings in groups UI.
2024-10-17 10:52:58 -07:00
Karl Stolley 746042915a portico: Align mobile subhead colors with desktop. 2024-10-16 16:20:56 -07:00
Lauryn Menard be3ac06cf4 invite-user-modal: Add validation on custom time input.
Disables the submit button on the invite user modal if the custom
time input value is a negative number or if the number is not an
integer.

Also updates the text for when the invite expires so say that the
custom time value is invalid.
2024-10-16 15:21:40 -07:00
Lauryn Menard 7d5a715ddf settings-input: Move time input check helper to web/src/util.
Moves the helper function for converting a time input into a
number so that it can be reused in both modals and settings
components.
2024-10-16 15:21:40 -07:00
Lauryn Menard 8e3317d15a invite-user-modal: Update invitate expiration text once post render. 2024-10-16 15:21:40 -07:00
Lauryn Menard b8888d2c33 invite-user-modal: Generalize converting custom input into minutes.
Moves custom time input helper to `web/src/util.ts` so that it
can be reused for other modals where users can select a custom
time duration.

Co-authored by: Ujjawal Modi <umodi2003@gmail.com>
2024-10-16 15:21:40 -07:00
Lauryn Menard cc1a3eeec1 invite-user-modal: Internationalize custom time unit options.
Prep for using these values other modals, specifically the
deactivate realm modal.
2024-10-16 15:21:40 -07:00
Vector73 68dc914b6e users: Refactor `has_permission` function.
Refactored `has_permission` function to programmatically check if the `policy_name`
is a group-based setting.
2024-10-16 14:26:20 -07:00
Vector73 8d341d1af9 settings: Remove `move_messages_between_streams_policy` setting.
Removed `move_messages_between_streams_policy` property, as the permission
to move messages between channels is now controlled by
`can_move_messages_between_channels_group` setting.
2024-10-16 14:26:20 -07:00
Vector73 1be0cb1b75 settings: Add `can_move_messages_between_channels_group` realm setting.
Added `can_move_messages_between_channels_group` realm setting to replace
`move_messages_between_streams_policy`.
2024-10-16 14:26:18 -07:00
Harsh c1ec39f3ba invites: Extract helpers for accessing invites by ID.
This adds `access_invite_by_id` to retrieve the preregistration user
for email invites by id, and a parallel function for multi-user invites.
2024-10-16 14:06:32 -07:00
Prakhar Pratyush ed18175ce7 migration: Add migration to mark 'intro_resolve_topic' as read.
This commit adds a migration to mark the 'intro_resolve_topic'
modal as shown for users who have edited/moved a message previously.
2024-10-16 13:47:12 -07:00
Shubham Padia 1e85bec9a9 user_groups: Change cursor to not-allowed if cannot leave. 2024-10-16 13:43:03 -07:00
Shubham Padia 4a2f126af9 user_groups: Open group setting typeahead on clicking label.
Fixes #32007.
2024-10-16 13:43:03 -07:00