Return DAV:unauthenticated for DAV:current-user-principal when not logged in
This commit is contained in:
parent
8551319682
commit
f146be3d6c
@ -927,9 +927,12 @@ def _propfind_response(base_prefix, path, item, props, user, write=False,
|
|||||||
else:
|
else:
|
||||||
is404 = True
|
is404 = True
|
||||||
elif tag == _tag("D", "current-user-principal"):
|
elif tag == _tag("D", "current-user-principal"):
|
||||||
|
if user:
|
||||||
tag = ET.Element(_tag("D", "href"))
|
tag = ET.Element(_tag("D", "href"))
|
||||||
tag.text = _href(base_prefix, ("/%s/" % user) if user else "/")
|
tag.text = _href(base_prefix, "/%s/" % user)
|
||||||
element.append(tag)
|
element.append(tag)
|
||||||
|
else:
|
||||||
|
element.append(ET.Element(_tag("D", "unauthenticated")))
|
||||||
elif tag == _tag("D", "current-user-privilege-set"):
|
elif tag == _tag("D", "current-user-privilege-set"):
|
||||||
privileges = [("D", "read")]
|
privileges = [("D", "read")]
|
||||||
if write:
|
if write:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user