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.

ldap: Check for deactivating owner role precisely.

Tim Abbottc598a84dd6fd
diff --git a/zerver/management/commands/sync_ldap_user_data.py b/zerver/management/commands/sync_ldap_user_data.py
index 0cfc2233d59..61ff4492059 100644
--- a/zerver/management/commands/sync_ldap_user_data.py
+++ b/zerver/management/commands/sync_ldap_user_data.py
@@ -46,7 +46,7 @@ def sync_ldap_user_data(
is_bot=False,
is_active=True,
realm__string_id=string_id,
- role__gte=UserProfile.ROLE_REALM_OWNER,
+ role=UserProfile.ROLE_REALM_OWNER,
).exists():
error_msg = (
"Ldap sync would have deactivated all owners of realm %s. "