settings: Add can_manage_all_groups setting to realm.

This commit does not add the logic of using this setting to actually
check the permission on the backend. That will be done in a later
commit.
Only owners can modify this setting, but we will add that logic in a
later commit in order to keep changes in this commit minimal.
Adding the setting breaks the frontend, since the frontend tries to find
a dropdown widget for the setting automatically. To avoid this, we've
added a small temporary if statement to `settings_org.js`.
Although, most lists where we insert this setting follow an unofficial
alphabetical order, `can_manage_all_groups` has been bunched together
with `can_create_groups` since keeping those similar settings together
would be nicer when checking any code related to creating/managing a
user group.
This commit is contained in:
Shubham Padia
2024-09-13 18:24:59 +00:00
committed by Tim Abbott
parent a9e14a184c
commit 2b6414acfb
10 changed files with 189 additions and 0 deletions

View File

@@ -1075,6 +1075,7 @@ group_setting_update_data_type = DictType(
("create_multiuse_invite_group", int),
("can_access_all_users_group", int),
("can_create_groups", group_setting_type),
("can_manage_all_groups", group_setting_type),
("can_create_public_channel_group", group_setting_type),
("can_create_private_channel_group", group_setting_type),
("can_create_web_public_channel_group", group_setting_type),