mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +00:00
models: Add can_access_all_users_group setting.
This commit adds new setting for controlling who can access all users in the realm which would have "Everyone" and "Members only" option. Fixes part of #10970.
This commit is contained in:
@@ -215,6 +215,16 @@ def access_user_group_for_setting(
|
||||
)
|
||||
)
|
||||
|
||||
if (
|
||||
permission_configuration.allowed_system_groups
|
||||
and user_group.name not in permission_configuration.allowed_system_groups
|
||||
):
|
||||
raise JsonableError(
|
||||
_("'{setting_name}' setting cannot be set to '{group_name}' group.").format(
|
||||
setting_name=setting_name, group_name=user_group.name
|
||||
)
|
||||
)
|
||||
|
||||
return user_group
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user