Add backend support for realm admins to rename streams.

(imported from commit eaf419f1f68dfd350b8c99e8a5089ec316f0c409)
This commit is contained in:
Jessica McKellar
2013-09-10 05:46:18 -04:00
parent b9da1e1976
commit cfeaa2be9b
3 changed files with 16 additions and 2 deletions

View File

@@ -961,6 +961,10 @@ def do_rename_stream(realm, old_name, new_name, log=True):
tornado_callbacks.send_notification(notice)
# Even though the token doesn't change, the web client needs to update the
# email forwarding address to display the correctly-escaped new name.
return {"email_address": encode_email_address(stream)}
def do_create_realm(domain, restricted_to_domain=True):
realm = get_realm(domain)
created = not realm