mirror of https://github.com/zulip/zulip.git
models: Add assert statement for full_members policy in has_permission.
This commit adds an assert statement in the last block of has_permission which checks whether the policy_value is POLICY_FULL_MEMBERS_ONLY. This assert statement is added for readability.
This commit is contained in:
parent
fe27fe5555
commit
911854d0bf
|
@ -1454,6 +1454,8 @@ class UserProfile(AbstractBaseUser, PermissionsMixin):
|
|||
|
||||
if policy_value == Realm.POLICY_MEMBERS_ONLY:
|
||||
return True
|
||||
|
||||
assert policy_value == Realm.POLICY_FULL_MEMBERS_ONLY
|
||||
return not self.is_provisional_member
|
||||
|
||||
def can_create_streams(self) -> bool:
|
||||
|
|
Loading…
Reference in New Issue