Commit 0ce7a593 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Adapt to changes to the userinfo

parent f0de80c5
......@@ -43,7 +43,7 @@ class UserSerializer(serializers.ModelSerializer):
class Meta:
model = models.User
fields = ['sub', 'email', 'username', 'ssh_keys', 'groups', 'deployments']
fields = ['email', 'userinfo', 'ssh_keys', 'groups', 'deployments']
class ClientSerializer(serializers.HyperlinkedModelSerializer):
......
......@@ -30,7 +30,8 @@ def _api_state_response(request):
'logged_in': request.user.is_authenticated()
}
if request.user.is_authenticated():
response['user'] = request.user.userinfo
response['user'] = serializers.UserSerializer(request.user).data
response['services'] = serializers.ServiceSerializer(
user_services(request.user),
......@@ -42,8 +43,6 @@ def _api_state_response(request):
# we display errors only once
del request.session['error']
LOGGER.debug('api state: %s', response)
return Response(response)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment