From 99133a34763860d38cc253368ae4e6d53367ee1d Mon Sep 17 00:00:00 2001 From: Unrud Date: Sun, 17 Sep 2017 14:03:59 +0200 Subject: [PATCH] Add DAV:owner property to items --- radicale/xmlutils.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/radicale/xmlutils.py b/radicale/xmlutils.py index 9b4f433..50f5763 100644 --- a/radicale/xmlutils.py +++ b/radicale/xmlutils.py @@ -968,6 +968,12 @@ def _propfind_response(base_prefix, path, item, props, user, write=False, element.text = str(len(item.serialize().encode(encoding))) else: is404 = True + elif tag == _tag("D", "owner"): + # return empty elment, if no owner available (rfc3744-5.1) + if collection.owner: + tag = ET.Element(_tag("D", "href")) + tag.text = _href(base_prefix, "/%s/" % collection.owner) + element.append(tag) elif is_collection: if tag == _tag("D", "getcontenttype"): if is_leaf: @@ -987,12 +993,6 @@ def _propfind_response(base_prefix, path, item, props, user, write=False, element.append(tag) tag = ET.Element(_tag("D", "collection")) element.append(tag) - elif tag == _tag("D", "owner"): - # return empty elment, if no owner available (rfc3744-5.1) - if collection.owner: - tag = ET.Element(_tag("D", "href")) - tag.text = _href(base_prefix, "/%s/" % collection.owner) - element.append(tag) elif tag == _tag("RADICALE", "displayname"): # Only for internal use by the web interface displayname = item.get_meta("D:displayname")