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: Fix incorrect check for deactivating all owners.

Tim Abbott5db8e43d5ccc
diff --git a/zerver/management/commands/sync_ldap_user_data.py b/zerver/management/commands/sync_ldap_user_data.py
index 8b05f919c58..0cfc2233d59 100644
--- a/zerver/management/commands/sync_ldap_user_data.py
+++ b/zerver/management/commands/sync_ldap_user_data.py
@@ -46,10 +46,10 @@ def sync_ldap_user_data(
is_bot=False,
is_active=True,
realm__string_id=string_id,
- role__gte=UserProfile.ROLE_REALM_ADMINISTRATOR,
+ role__gte=UserProfile.ROLE_REALM_OWNER,
).exists():
error_msg = (
- "Ldap sync would have deactivated all administrators of realm %s. "
+ "Ldap sync would have deactivated all owners of realm %s. "
+ "This is most likely due "
+ "to a misconfiguration of LDAP settings. Rolling back...\n"
+ "Use the --force option if the mass deactivation is intended."