zulip/zerver
Lauryn Menard ebfe9637c8 subscribe-unsubscribe: Improve error response for unexpected users.
Updates the API error response when there is an unknown or
deactivated user in the `principals` parameter for either the
`/api/subscribe` or `/api/unsubscribe` endpoints. We now use
the `access_user_by_email` and `access_user_by_id` code paths,
which return an HTTP response of 400 and a "BAD_REQUEST" code.

Previously, an HTTP response of 403 was returned with a special
"UNAUTHORIZED_PRINCIPAL" code in the error response. This code
was not documented in the API documentation and is removed as
a potential JsonableError code with these changes.

Fixes #26593.
2023-08-31 13:48:39 -07:00
..
actions users: Send stream creation/deletion events on role change. 2023-08-25 12:56:36 -07:00
data_import ruff: Fix PERF102 Using only the keys/values of a dict. 2023-08-07 17:23:55 -07:00
integration_fixtures/nagios
lib widgets: Rename confusing attribute name in `tabbed_sections.py`. 2023-08-31 11:55:28 -07:00
management send_email: Broaden type of context dict. 2023-08-30 11:54:28 -07:00
migrations scheduled-mails: Migrate existing scheduled emails to new templates. 2023-08-18 16:51:46 -07:00
openapi subscribe-unsubscribe: Improve error response for unexpected users. 2023-08-31 13:48:39 -07:00
tests subscribe-unsubscribe: Improve error response for unexpected users. 2023-08-31 13:48:39 -07:00
tornado notifications: Rename 'pm' to 'dm' in 'RecipientInfoResult' dataclass. 2023-08-10 17:41:49 -07:00
transaction_tests user_groups: Make locks required for updating user group memberships. 2023-08-24 17:21:08 -07:00
views subscribe-unsubscribe: Improve error response for unexpected users. 2023-08-31 13:48:39 -07:00
webhooks integrations: Add support for "Test plugin" in Sentry integration. 2023-08-22 12:09:02 -07:00
worker migration: Rename extra_data_json to extra_data in audit log models. 2023-08-16 17:18:14 -07:00
__init__.py
apps.py requirements: Upgrade Python requirements. 2023-04-03 22:39:21 -07:00
context_processors.py emails: Add corporate_enabled to context for emails. 2023-05-01 10:32:43 -07:00
decorator.py logging_util: Remove dependence on get_current_request. 2023-07-11 22:23:47 -07:00
filters.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
forms.py python: Convert translated positional {} fields to {named} fields. 2023-07-18 15:19:07 -07:00
logging_handlers.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
middleware.py middleware: Allow HTTP from localhost, not through a reverse proxy. 2023-08-17 12:07:37 -07:00
models.py message: Do not pass "sender__realm" to select_related. 2023-08-23 11:38:32 -07:00
signals.py requirements: Upgrade to Django 4.0. 2022-07-13 16:07:17 -07:00