[sso-admin] Add compatibility keys in outgoing API
parent
822ed98ab4
commit
86baf7bd69
|
@ -36,6 +36,9 @@ def user_parser(dduser: DDUser) -> DDUser:
|
|||
user["keycloak_id"] = user.pop("id")
|
||||
user["role"] = user["roles"][0] if user.get("roles", []) else None
|
||||
user["groups"] = user.get("groups", user.get("keycloak_groups", []))
|
||||
# Compatibility for the API
|
||||
user["first"] = user["firstname"]
|
||||
user["last"] = user["lasttname"]
|
||||
return user
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue