ldap: Fix the error message for deactivated users.

This commit is contained in:
Tim Abbott
2017-11-17 16:07:20 -08:00
parent 97f1c2a72a
commit c4c8879cf7
2 changed files with 19 additions and 2 deletions

View File

@@ -474,8 +474,7 @@ class ZulipLDAPAuthBackend(ZulipLDAPAuthBackendBase):
if return_data.get("inactive_realm"):
raise ZulipLDAPException("Realm has been deactivated")
if return_data.get("inactive_user"):
# Bug: This isn't the correct response, but it's what the old code did.
raise ZulipLDAPException("Realm has been deactivated")
raise ZulipLDAPException("User has been deactivated")
if return_data.get("invalid_subdomain"):
# TODO: Implement something in the caller for this to
# provide a nice user-facing error message for this