summary refs log tree commit diff
path: root/synapse/rest
diff options
context:
space:
mode:
authorDirk Klimpel <5740567+dklimpel@users.noreply.github.com>2020-11-05 14:55:45 +0100
committerGitHub <noreply@github.com>2020-11-05 13:55:45 +0000
commite4676bd8772275833857c803f8fe4025744cec01 (patch)
treefc51c24cf327979a294a74922ff2205e39ac9df6 /synapse/rest
parentConsolidate purge table lists to prevent desyncronisation (#8713) (diff)
downloadsynapse-e4676bd8772275833857c803f8fe4025744cec01.tar.xz
Add `displayname` to Shared-Secret Registration for admins (#8722)
Add `displayname` to Shared-Secret Registration for admins to `POST /_synapse/admin/v1/register`
Diffstat (limited to 'synapse/rest')
-rw-r--r--synapse/rest/admin/users.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/rest/admin/users.py b/synapse/rest/admin/users.py
index b337311a37..3638e219f2 100644
--- a/synapse/rest/admin/users.py
+++ b/synapse/rest/admin/users.py
@@ -412,6 +412,7 @@ class UserRegisterServlet(RestServlet):
 
         admin = body.get("admin", None)
         user_type = body.get("user_type", None)
+        displayname = body.get("displayname", None)
 
         if user_type is not None and user_type not in UserTypes.ALL_USER_TYPES:
             raise SynapseError(400, "Invalid user type")
@@ -448,6 +449,7 @@ class UserRegisterServlet(RestServlet):
             password_hash=password_hash,
             admin=bool(admin),
             user_type=user_type,
+            default_display_name=displayname,
             by_admin=True,
         )