mirror of https://github.com/zulip/zulip.git
Make do_create_realm aware of restricted_to_domain.
(imported from commit bee8d79cd5f5d4165e2a573eb3a91123857be6cd)
This commit is contained in:
parent
67a25614df
commit
048a53c1ce
|
@ -693,12 +693,14 @@ def do_change_full_name(user_profile, full_name, log=True):
|
|||
'user': user_profile.email,
|
||||
'full_name': full_name})
|
||||
|
||||
def do_create_realm(domain):
|
||||
realm, created = Realm.objects.get_or_create(domain=domain)
|
||||
def do_create_realm(domain, restricted_to_domain=True):
|
||||
realm, created = Realm.objects.get_or_create(
|
||||
domain=domain, restricted_to_domain=restricted_to_domain)
|
||||
if created:
|
||||
# Log the event
|
||||
log_event({"type": "realm_created",
|
||||
"domain": domain})
|
||||
"domain": domain,
|
||||
"restricted_to_domain": restricted_to_domain})
|
||||
|
||||
internal_send_message("humbug+signups@humbughq.com", "stream",
|
||||
"signups", domain, "Signups enabled.")
|
||||
|
|
Loading…
Reference in New Issue