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.pyindex 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_ONLYreturn not self.is_provisional_memberdef can_create_streams(self) -> bool: