From d166b8fce1d07932981fd63d75fbf20488b9c80d Mon Sep 17 00:00:00 2001 From: Peter Bieringer Date: Sat, 4 Apr 2026 08:40:43 +0200 Subject: [PATCH] sharing/propfind: only offer this privileges if sharing is enabled and not being a share (nested sharing is not supported) --- radicale/app/propfind.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/radicale/app/propfind.py b/radicale/app/propfind.py index 4e1760e1..238dd39a 100644 --- a/radicale/app/propfind.py +++ b/radicale/app/propfind.py @@ -330,10 +330,12 @@ def xml_propfind_response( privileges.append("D:write-properties") privileges.append("D:write-content") - if ("T" in raw_permissions or (self._sharing.permit_create_token and "t" not in raw_permissions)): - privileges.append("RADICALE:share-token") - if ("M" in raw_permissions or (self._sharing.permit_create_map and "m" not in raw_permissions)): - privileges.append("RADICALE:share-map") + if self._sharing._enabled and not share: + # only offer this privileges if sharing is enabled and not being a share (nested sharing is not supported) + if ("T" in raw_permissions or (self._sharing.permit_create_token and "t" not in raw_permissions)): + privileges.append("RADICALE:share-token") + if ("M" in raw_permissions or (self._sharing.permit_create_map and "m" not in raw_permissions)): + privileges.append("RADICALE:share-map") for human_tag in privileges: privilege = ET.Element(xmlutils.make_clark("D:privilege"))