registration: Add code to set email_address_visibility during signup.

This commit adds backend code to set email_address_visibility when
registering a new user. The realm-level default and the value of
source profile gets overridden by the value user selected during
signup.
This commit is contained in:
Sahil Batra
2023-02-13 22:10:16 +05:30
committed by Tim Abbott
parent 0620d2ac1b
commit 36584a3571
7 changed files with 81 additions and 12 deletions

View File

@@ -755,6 +755,7 @@ Output:
key: Optional[str] = None,
realm_type: int = Realm.ORG_TYPES["business"]["id"],
enable_marketing_emails: Optional[bool] = None,
email_address_visibility: Optional[int] = None,
is_demo_organization: bool = False,
**extra: str,
) -> "TestHttpResponse":
@@ -783,6 +784,8 @@ Output:
}
if enable_marketing_emails is not None:
payload["enable_marketing_emails"] = enable_marketing_emails
if email_address_visibility is not None:
payload["email_address_visibility"] = email_address_visibility
if password is not None:
payload["password"] = password
if realm_in_root_domain is not None: