mirror of
https://github.com/zulip/zulip.git
synced 2025-11-17 20:41:46 +00:00
settings: Replace invite_by_admins_policy with invite_to_realm_policy.
This commit replaces invite_by_admins_policy, which was a bool field, with a new enum field invite_by_realm_policy. Though the final goal is to add moderators and full members option using COMMON_POLICY_TYPES, but this will be done in a separate commit to make this easy for review.
This commit is contained in:
@@ -349,7 +349,7 @@ def compute_show_invites_and_add_streams(user_profile: Optional[UserProfile]) ->
|
||||
if user_profile.is_realm_admin:
|
||||
return True, True
|
||||
|
||||
if user_profile.realm.invite_by_admins_only:
|
||||
if user_profile.realm.invite_to_realm_policy == Realm.INVITE_TO_REALM_ADMINS_ONLY:
|
||||
return False, True
|
||||
|
||||
return True, True
|
||||
|
||||
Reference in New Issue
Block a user