aboutsummaryrefslogtreecommitdiff
path: root/gn_auth/auth/authorisation/users
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth/auth/authorisation/users')
-rw-r--r--gn_auth/auth/authorisation/users/masquerade/views.py3
-rw-r--r--gn_auth/auth/authorisation/users/views.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/gn_auth/auth/authorisation/users/masquerade/views.py b/gn_auth/auth/authorisation/users/masquerade/views.py
index 259cdfe..b0464ba 100644
--- a/gn_auth/auth/authorisation/users/masquerade/views.py
+++ b/gn_auth/auth/authorisation/users/masquerade/views.py
@@ -1,4 +1,5 @@
"""Endpoints for user masquerade"""
+from dataclasses import asdict
from uuid import UUID
from functools import partial
@@ -42,7 +43,7 @@ def masquerade() -> Response:
"token": __dump_token__(token)
},
"masquerade_as": {
- "user": masq_user._asdict(),
+ "user": asdict(masq_user),
"token": __dump_token__(with_db_connection(__masq__))
}
})
diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py
index bbb220e..9e6c0c3 100644
--- a/gn_auth/auth/authorisation/users/views.py
+++ b/gn_auth/auth/authorisation/users/views.py
@@ -178,4 +178,4 @@ def list_all_users() -> Response:
"""List all the users."""
with require_oauth.acquire("profile group") as _the_token:
return jsonify(tuple(
- dictify(user) for user in with_db_connection(list_users)))
+ asdict(user) for user in with_db_connection(list_users)))