mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
realm_creation: Disable open realm creation if no password backend.
This commit is contained in:
committed by
Tim Abbott
parent
de37ab28a8
commit
57d77e0a55
@@ -1472,6 +1472,21 @@ class RealmCreationTest(ZulipTestCase):
|
||||
self.assertEqual(result.status_code, 200)
|
||||
self.assert_in_response("Organization creation link required", result)
|
||||
|
||||
@override_settings(OPEN_REALM_CREATION=True)
|
||||
def test_create_realm_without_password_backend_enabled(self) -> None:
|
||||
email = "user@example.com"
|
||||
with self.settings(
|
||||
AUTHENTICATION_BACKENDS=(
|
||||
"zproject.backends.SAMLAuthBackend",
|
||||
"zproject.backends.ZulipDummyBackend",
|
||||
)
|
||||
):
|
||||
result = self.submit_realm_creation_form(
|
||||
email, realm_subdomain="custom-test", realm_name="Zulip test"
|
||||
)
|
||||
self.assertEqual(result.status_code, 200)
|
||||
self.assert_in_response("Organization creation link required", result)
|
||||
|
||||
@override_settings(OPEN_REALM_CREATION=True)
|
||||
def test_create_realm_with_subdomain(self) -> None:
|
||||
password = "test"
|
||||
|
Reference in New Issue
Block a user