sharing/propfind: only offer this privileges if sharing is enabled and not being a share (nested sharing is not supported)
This commit is contained in:
@@ -330,10 +330,12 @@ def xml_propfind_response(
|
|||||||
privileges.append("D:write-properties")
|
privileges.append("D:write-properties")
|
||||||
privileges.append("D:write-content")
|
privileges.append("D:write-content")
|
||||||
|
|
||||||
if ("T" in raw_permissions or (self._sharing.permit_create_token and "t" not in raw_permissions)):
|
if self._sharing._enabled and not share:
|
||||||
privileges.append("RADICALE:share-token")
|
# only offer this privileges if sharing is enabled and not being a share (nested sharing is not supported)
|
||||||
if ("M" in raw_permissions or (self._sharing.permit_create_map and "m" not in raw_permissions)):
|
if ("T" in raw_permissions or (self._sharing.permit_create_token and "t" not in raw_permissions)):
|
||||||
privileges.append("RADICALE:share-map")
|
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:
|
for human_tag in privileges:
|
||||||
privilege = ET.Element(xmlutils.make_clark("D:privilege"))
|
privilege = ET.Element(xmlutils.make_clark("D:privilege"))
|
||||||
|
|||||||
Reference in New Issue
Block a user