mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 05:34:57 -04:00
Add displayname
to Shared-Secret Registration for admins (#8722)
Add `displayname` to Shared-Secret Registration for admins to `POST /_synapse/admin/v1/register`
This commit is contained in:
parent
6abb1ad0be
commit
e4676bd877
5 changed files with 138 additions and 9 deletions
|
@ -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,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue