Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
demo-orgs: Make password not required for demo org creation.
Lauryn Menard425abd83fc11
diff --git a/zerver/views/development/registration.py b/zerver/views/development/registration.pyindex 0cf58848327..9dad20acb2d 100644--- a/zerver/views/development/registration.py+++ b/zerver/views/development/registration.py@@ -118,7 +118,6 @@ def register_demo_development_realm(request: HttpRequest) -> HttpResponse:realm_default_language=realm_default_language,email_address_visibility=email_address_visibility,full_name=name,- password="test",realm_subdomain=realm_subdomain,terms="true",is_demo_organization="true",diff --git a/zerver/views/registration.py b/zerver/views/registration.pyindex be3dc2e5c40..54cb059e583 100644--- a/zerver/views/registration.py+++ b/zerver/views/registration.py@@ -614,7 +614,12 @@ def registration_helper(passform = RegistrationForm(postdata, realm_creation=realm_creation, realm=realm)- if not (password_auth_enabled(realm) and password_required):+ if realm_creation and demo_organization_creation:+ # TODO: Remove settings.DEVELOPMENT when demo organization feature ready+ # to be fully implemented.+ assert settings.DEVELOPMENT+ form["password"].field.required = False+ elif not (password_auth_enabled(realm) and password_required):form["password"].field.required = Falseif form.is_valid():@@ -623,7 +628,8 @@ def registration_helper(else:# If the user wasn't prompted for a password when# completing the authentication form (because they're- # signing up with SSO and no password is required), set+ # signing up with SSO and no password is required, or+ # because they're creating a new demo organization), set# the password field to `None` (Which causes Django to# create an unusable password).password = None