Merge pull request #198 from untitaker/discovery
Return user basepath for current-user-principal
This commit is contained in:
commit
788b775c32
@ -297,10 +297,7 @@ def _propfind_response(path, item, props, user):
|
|||||||
# pylint: enable=W0511
|
# pylint: enable=W0511
|
||||||
elif tag == _tag("D", "current-user-principal") and user:
|
elif tag == _tag("D", "current-user-principal") and user:
|
||||||
tag = ET.Element(_tag("D", "href"))
|
tag = ET.Element(_tag("D", "href"))
|
||||||
if item.resource_type == "addressbook":
|
tag.text = _href("/%s/" % user)
|
||||||
tag.text = _href("/%s/addressbook.vcf/" % user)
|
|
||||||
else:
|
|
||||||
tag.text = _href("/%s/calendar.ics/" % user)
|
|
||||||
element.append(tag)
|
element.append(tag)
|
||||||
elif tag == _tag("D", "current-user-privilege-set"):
|
elif tag == _tag("D", "current-user-privilege-set"):
|
||||||
privilege = ET.Element(_tag("D", "privilege"))
|
privilege = ET.Element(_tag("D", "privilege"))
|
||||||
|
Loading…
Reference in New Issue
Block a user