mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
realm: Enable spectator access by default in development.
Enable spectator access for test `zulip` realm in developement setup. Add option in `do_create_realm` to configure `enable_spectator_access` field of `Realm`.
This commit is contained in:
@@ -5067,6 +5067,7 @@ def do_create_realm(
|
||||
org_type: Optional[int] = None,
|
||||
date_created: Optional[datetime.datetime] = None,
|
||||
is_demo_organization: Optional[bool] = False,
|
||||
enable_spectator_access: Optional[bool] = False,
|
||||
) -> Realm:
|
||||
if string_id == settings.SOCIAL_AUTH_SUBDOMAIN:
|
||||
raise AssertionError("Creating a realm on SOCIAL_AUTH_SUBDOMAIN is not allowed!")
|
||||
@@ -5089,6 +5090,8 @@ def do_create_realm(
|
||||
kwargs["plan_type"] = plan_type
|
||||
if org_type is not None:
|
||||
kwargs["org_type"] = org_type
|
||||
if enable_spectator_access is not None:
|
||||
kwargs["enable_spectator_access"] = enable_spectator_access
|
||||
|
||||
if date_created is not None:
|
||||
# The date_created parameter is intended only for use by test
|
||||
|
||||
Reference in New Issue
Block a user