parent
d3d29802ad
commit
8d863e52b2
@ -644,26 +644,28 @@ def _propfind_response(path, item, props, user, write=False):
|
|||||||
element.append(tag)
|
element.append(tag)
|
||||||
tag = ET.Element(_tag("D", "collection"))
|
tag = ET.Element(_tag("D", "collection"))
|
||||||
element.append(tag)
|
element.append(tag)
|
||||||
elif is_leaf:
|
elif tag == _tag("D", "owner"):
|
||||||
if tag == _tag("D", "owner") and item.owner:
|
if is_leaf and item.owner:
|
||||||
element.text = "/%s/" % item.owner
|
element.text = "/%s/" % item.owner
|
||||||
elif tag == _tag("CS", "getctag"):
|
|
||||||
element.text = item.etag
|
|
||||||
elif tag == _tag("C", "calendar-timezone"):
|
|
||||||
element.text = item.get_meta("C:calendar-timezone")
|
|
||||||
elif tag == _tag("D", "displayname"):
|
|
||||||
element.text = item.get_meta("D:displayname") or item.path
|
|
||||||
elif tag == _tag("ICAL", "calendar-color"):
|
|
||||||
element.text = item.get_meta("ICAL:calendar-color")
|
|
||||||
else:
|
else:
|
||||||
human_tag = _tag_from_clark(tag)
|
is404 = True
|
||||||
meta = item.get_meta(human_tag)
|
elif tag == _tag("D", "displayname"):
|
||||||
if meta:
|
if is_leaf:
|
||||||
element.text = meta
|
element.text = item.get_meta("D:displayname") or item.path
|
||||||
else:
|
else:
|
||||||
is404 = True
|
is404 = True
|
||||||
|
elif tag == _tag("CS", "getctag"):
|
||||||
|
if is_leaf:
|
||||||
|
element.text = item.etag
|
||||||
|
else:
|
||||||
|
is404 = True
|
||||||
else:
|
else:
|
||||||
is404 = True
|
human_tag = _tag_from_clark(tag)
|
||||||
|
meta = item.get_meta(human_tag)
|
||||||
|
if meta:
|
||||||
|
element.text = meta
|
||||||
|
else:
|
||||||
|
is404 = True
|
||||||
# Not for collections
|
# Not for collections
|
||||||
elif tag == _tag("D", "getcontenttype"):
|
elif tag == _tag("D", "getcontenttype"):
|
||||||
name = item.name.lower()
|
name = item.name.lower()
|
||||||
|
Loading…
Reference in New Issue
Block a user