zulip/zerver
Mateusz Mandera 114f13e0ee auth: Fix re-enabling of SAML/AzureAD in organization settings UI.
This bug was introduced in da9e4e6e54.
validate validate_plan_for_authentication_methods is already called
inside validate_authentication_methods_dict_from_api, conditionally on
settings.BILLING_ENABLED. This additional, redundant call runs
regardless of BILLING_ENABLED, and thus prevents a self-hosted server
from enabling certain backends in the organization settings UI.

The impact of this is limited - in order to encounter this bug, a
self-hosted server would have to first disable the backend in the UI, as
self-hosted realms are created with all backend flags enabled. A backend
doesn't show up in the org settings UI until it is first enabled in
AUTHENTICATION_BACKENDS in settings.py - that's why this is a rare
state. A sequence of steps like this has to be followed to reproduce:
1. Add the backend to AUTHENTICATION_BACKENDS in settings.py.
2. Disable the backend in the org settings UI.
3. Now try to re-enable it, which fails due to the bug.
2024-08-05 21:14:43 -07:00
..
actions thumbnail: Resolve a race condition when rendering messages. 2024-08-01 16:48:16 -07:00
data_import refactor: Rename `huddle` to `direct_message_group` in non api files. 2024-07-31 23:25:56 -07:00
integration_fixtures/nagios
lib settings: Remove create_web_public_stream_policy setting. 2024-08-01 22:49:33 -07:00
management thumbnail: Move get_image_thumbnail_path and split_thumbnail_path. 2024-07-18 13:50:28 -07:00
migrations settings: Remove create_web_public_stream_policy setting. 2024-08-01 22:49:33 -07:00
models settings: Remove create_web_public_stream_policy setting. 2024-08-01 22:49:33 -07:00
openapi settings: Remove create_web_public_stream_policy setting. 2024-08-01 22:49:33 -07:00
tests auth: Fix re-enabling of SAML/AzureAD in organization settings UI. 2024-08-05 21:14:43 -07:00
tornado events: Migrate to typed_endpoint. 2024-07-31 17:10:06 -07:00
transaction_tests ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
views auth: Fix re-enabling of SAML/AzureAD in organization settings UI. 2024-08-05 21:14:43 -07:00
webhooks ruff: Fix PLR1714 Consider merging multiple comparisons. 2024-08-01 16:46:58 -07:00
worker thumbnail: Resolve a race condition when rendering messages. 2024-08-01 16:48:16 -07:00
__init__.py
apps.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
context_processors.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
decorator.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
filters.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
forms.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
logging_handlers.py ruff: Fix UP007 Use `X | Y` for type annotations. 2024-07-13 22:28:22 -07:00
middleware.py ruff: Fix UP035 Import from `collections.abc`, `typing` instead. 2024-07-13 22:28:22 -07:00
signals.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00