zulip/zerver
m-e-l-u-h-a-n 2eeb82edba api: Add USER_DEACTIVATED error code.
In validate_account_and_subdomain we check if
user's account is not deactivated. In case of
failure of this check we raise our standard
JsonableError. While this works well in most
cases but it creates difficulties in handling
of deactivated accounts for non-browser clients.

So we register a new USER_DEACTIVATED error
code so that clients can distinguish if error
is because of deactivated account. Following
these changes `validate_account_and_subdomain`
raises UserDeactivatedError if user's account
is deactivated.

This error is also documented in
`/api/rest-error-handling`.

Testing: I have mostly relied on automated
backend tests to test this.

Partially addresses issue #17763.
2021-03-31 08:46:13 -07:00
..
data_import import/export: Fix deprecated authentication method for Slack. 2021-03-08 12:56:37 -08:00
lib api: Add USER_DEACTIVATED error code. 2021-03-31 08:46:13 -07:00
management refactor: Make acting_user a mandatory kwarg for do_deactivate_user. 2021-03-29 15:51:45 -07:00
migrations migrations: Subscription.is_user_active denormalization - step two. 2021-03-30 09:29:36 -07:00
openapi api: Add USER_DEACTIVATED error code. 2021-03-31 08:46:13 -07:00
templatetags python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
tests api: Add USER_DEACTIVATED error code. 2021-03-31 08:46:13 -07:00
tornado docs: Add a document explaining email/push notifications. 2021-03-05 15:24:25 -08:00
views migrations: Subscription.is_user_active denormalization - step one. 2021-03-30 09:19:03 -07:00
webhooks statuspage: Properly detect the update is for component or incident. 2021-03-30 12:06:09 -07:00
worker outgoing_webhook: Join build_bot_request and send_data_to_server. 2021-03-29 18:24:44 -07:00
__init__.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
apps.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
context_processors.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
decorator.py api: Add USER_DEACTIVATED error code. 2021-03-31 08:46:13 -07:00
filters.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
forms.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
logging_handlers.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
middleware.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
models.py migrations: Subscription.is_user_active denormalization - step two. 2021-03-30 09:29:36 -07:00
signals.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00