Skip to content
Snippets Groups Projects
Commit 16d42121 authored by Jean-Baptiste's avatar Jean-Baptiste
Browse files

update: add User Header

parent ff33c01b
No related branches found
Tags v0.5.69
No related merge requests found
Pipeline #903 passed with stage
in 1 minute and 24 seconds
......@@ -143,6 +143,11 @@ class LDPViewSet(LDPViewSetGenerator):
if response.status_code == 201 and '@id' in response.data:
response["Location"] = response.data['@id']
response["Accept-Post"] = "application/ld+json"
if request.user.is_authenticated():
try:
response['User'] = request.user.webid()
except AttributeError:
pass
return response
def update(self, request, *args, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment