Allow admin users to create or modify users without a shared secret (#6495)

Signed-off-by: Manuel Stahl <manuel.stahl@awesome-technologies.de>
This commit is contained in:
Manuel Stahl 2020-01-09 14:31:00 +01:00 committed by Richard van der Hoff
parent d773290cb1
commit d2906fe666
9 changed files with 655 additions and 339 deletions

View file

@ -51,6 +51,15 @@ class AdminHandler(BaseHandler):
return ret
async def get_user(self, user):
"""Function to get user details"""
ret = await self.store.get_user_by_id(user.to_string())
if ret:
profile = await self.store.get_profileinfo(user.localpart)
ret["displayname"] = profile.display_name
ret["avatar_url"] = profile.avatar_url
return ret
async def get_users(self):
"""Function to retrieve a list of users in users table.