mirror of
https://github.com/Kozea/Radicale.git
synced 2025-04-05 06:07:35 +03:00
Restore the Lightning + anonymous calendars support
This commit is contained in:
parent
ec9e410659
commit
b8bcf65785
2 changed files with 8 additions and 5 deletions
|
@ -264,9 +264,11 @@ def _propfind_response(path, item, props, user):
|
|||
if tag == _tag("D", "getcontenttype"):
|
||||
element.text = "text/calendar"
|
||||
elif tag == _tag("D", "resourcetype"):
|
||||
if not item.is_principal:
|
||||
tag = ET.Element(_tag("C", "calendar"))
|
||||
if item.is_principal:
|
||||
tag = ET.Element(_tag("D", "principal"))
|
||||
element.append(tag)
|
||||
tag = ET.Element(_tag("C", "calendar"))
|
||||
element.append(tag)
|
||||
tag = ET.Element(_tag("D", "collection"))
|
||||
element.append(tag)
|
||||
elif tag == _tag("D", "owner") and item.owner_url:
|
||||
|
@ -284,6 +286,9 @@ def _propfind_response(path, item, props, user):
|
|||
# Not for calendars
|
||||
elif tag == _tag("D", "getcontenttype"):
|
||||
element.text = "text/calendar; component=%s" % item.tag.lower()
|
||||
elif tag == _tag("D", "resourcetype"):
|
||||
# resourcetype must be returned empty for non-collection elements
|
||||
pass
|
||||
else:
|
||||
is404 = True
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue