sharing: extend DB with Conversion and Actions(reserved)

This commit is contained in:
Peter Bieringer
2026-03-22 21:32:12 +01:00
parent 62a8189917
commit f6d0b0b07c
5 changed files with 122 additions and 33 deletions

View File

@@ -31,7 +31,7 @@ from radicale.log import logger
def propose_filename(collection: storage.BaseCollection, share: Union[dict, None] = None) -> str:
"""Propose a filename for a collection."""
share_bday_automap = False
if share and share['ShareType'] == "bday":
if share and share['Conversion'] == "bday":
share_bday_automap = True
if collection.tag == "VADDRESSBOOK" and not share_bday_automap:
fallback_title = "Address book"
@@ -112,7 +112,7 @@ class ApplicationPartGet(ApplicationBase):
if not item.tag:
return (httputils.NOT_ALLOWED if limited_access else
httputils.DIRECTORY_LISTING)
if share and share['ShareType'] == "bday":
if share and share['Conversion'] == "bday":
content_type = xmlutils.MIMETYPES["VCALENDAR"]
else:
content_type = xmlutils.MIMETYPES[item.tag]
@@ -130,7 +130,7 @@ class ApplicationPartGet(ApplicationBase):
"ETag": item.etag}
if content_disposition:
headers["Content-Disposition"] = content_disposition
if isinstance(item, storage.BaseCollection) and self._sharing._enabled and share and share['ShareType'] == "bday":
if isinstance(item, storage.BaseCollection) and share and share['Conversion'] == "bday":
# convert VCF to ICS
answer = item.serialize(vcf_to_ics=True)
else: