authorization: Return more detail in "/access/users/list"
Return a list of objects with username and creation date fields. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
e472fb6c1e
commit
b3187710d0
|
@ -213,8 +213,14 @@ class Authorization:
|
||||||
return self._delete_jwt_user(web_request)
|
return self._delete_jwt_user(web_request)
|
||||||
|
|
||||||
async def _handle_list_request(self, web_request):
|
async def _handle_list_request(self, web_request):
|
||||||
user_list = list(self.users.keys())
|
user_list = []
|
||||||
user_list.remove(API_USER)
|
for user in self.users.values():
|
||||||
|
if user['username'] == API_USER:
|
||||||
|
continue
|
||||||
|
user_list.append({
|
||||||
|
'username': user['username'],
|
||||||
|
'created_on': user['created_on']
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
'users': user_list
|
'users': user_list
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue