Commit Graph

16 Commits

Author SHA1 Message Date
Kislay Verma
67ca49488f tests: Use make_realm to create type-correct realm objects.
Another step in the direction of improving node tests
and using type-correct organic data as much as possible.
2025-08-28 11:35:07 -07:00
Kislay Verma
c134cc398f tests: Add library function to create user groups.
This is done to ensure the objects exactly match
the schema/types during tests.

Fixes part of #32326.
2025-08-11 11:57:49 -07:00
Sahil Batra
928c04df31 settings: Disable checkbox in permissions panel.
This commit adds code to disable checkbox in permissions panel
if unchecking the checkbox will set the setting to nobody group
and that setting can't be set to nobody group,

Fixes part of #33730.
2025-04-04 11:06:05 -07:00
Sahil Batra
ff05fd558c groups: Change display names of everyone and members system groups.
"role:members" group name is displayed as "Everyone except guests"
in the UI and "role:everyone" group name is displayed as
"Everyone including guests".
2025-02-19 17:02:51 -08:00
Sahil Batra
3581d5feb8 node-tests: Add tests for functions used to check group permissions.
This commit add node tests for functions used to check permissions
a group has for rendering "Permissions" panel.
2025-01-28 10:06:31 -08:00
Sahil Batra
52fbca65ce group-settings: Move functions used for group settings.
This commit moves get_realm_user_groups_for_setting and
get_realm_user_groups_for_dropdown_list_widget functions
from user_groups.ts to group_permission_settings.ts.

This change is needed to avoid import cycles in further
commits to add "Permissions" panel for groups.
2025-01-24 14:51:51 -08:00
Sahil Batra
255eee255b events: Pass group in functions called for updating the group.
We now pass group in functions called while handling group update
events, instead of fetching the groups in those function as we
will need the old setting value in future commits.
2025-01-24 14:51:51 -08:00
Sahil Batra
cbada036a9 user-groups: Live update membership status text.
This commit adds code to live update the membership status text
when a user is added or removed from a group that is subgroup
of the group opened in the right panel of groups UI.
2024-12-05 10:35:41 -08:00
Shubham Padia
173c09e32b stream_events: Loop over stream group settings for update_property. 2024-12-04 12:26:16 -08:00
Sahil Batra
367a0bdbff groups: Remove id_field_name field from GroupPermissionSetting.
id_field_name was being used only to set the initial dummy
values for realm settings. We can directly add "_id" to the
setting name instead of having an extra id_field_name field.
2024-12-04 11:15:17 -08:00
Sahil Batra
121df45cc4 groups: Remove allow_owners_group field from GroupPermissionSetting.
As we now allow anonymous groups and settings can be set to any
set of users, there is no benefit in not allowing a setting to
be set to "Owners" group.
2024-12-04 11:12:28 -08:00
Shubham Padia
7e92c2ad16 streams: Use can_administer_channel_group to administer channel.
Fixes #31959.
2024-12-03 18:38:25 -08:00
Shubham Padia
bf73e1711d user_group: Disable leave checkmark if user isn't a direct member.
If the user is not a direct member, but a member via a subgroup, we will
show the list of subgroups beloging to that group which the current user
is a direct member of in a tooltip. The cursor on the checkmark will be
default in this case instead of a pointer.
2024-12-02 17:59:18 -08:00
Shubham Padia
8a28b31be3 user_group: List groups that a user is associated via subgroups.
In `Group settings` -> `Your groups` and `User Profile Popover` -> `User
groups`, we only listed groups that a user was a direct member of. Now,
we will also list groups that a user is not a direct member of, but
associated via a subgroup.
Fixes #32486.
2024-12-02 17:59:18 -08:00
Sahil Batra
da02135f88 group-settings: Use new setting for controlling removing members. 2024-12-02 17:38:46 -08:00
Anders Kaseorg
687f1b1651 tests: Rename the Node tests to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00