Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

models: Add assert statement for full_members policy in has_permission.

sahil839911854d0bf11
diff --git a/zerver/models.py b/zerver/models.py
index 548ee8962b6..0a4d5ccc3ad 100644
--- a/zerver/models.py
+++ b/zerver/models.py
@@ -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: