sharing/property-overlay: permit and replace displayname

This commit is contained in:
Peter Bieringer
2026-03-14 07:25:26 +01:00
parent ba7baab79f
commit 7874dc62ea
2 changed files with 5 additions and 1 deletions

View File

@@ -312,6 +312,8 @@ def xml_propfind_response(
elif tag == xmlutils.make_clark("RADICALE:displayname"):
# Only for internal use by the web interface
displayname = collection.get_meta("D:displayname")
if share and share['Properties'] and share['Properties']["D:displayname"]:
displayname = share['Properties']["D:displayname"]
if displayname is not None:
element.text = displayname
else:
@@ -324,6 +326,8 @@ def xml_propfind_response(
is404 = True
elif tag == xmlutils.make_clark("D:displayname"):
displayname = collection.get_meta("D:displayname")
if share and share['Properties'] and share['Properties']["D:displayname"]:
displayname = share['Properties']["D:displayname"]
if not displayname and is_leaf:
displayname = collection.path
if displayname is not None:

View File

@@ -111,7 +111,7 @@ PATH_PATTERN: str = "([a-zA-Z0-9/.\\-]+)" # TODO: extend or find better source
USER_PATTERN: str = "([a-zA-Z0-9@]+)" # TODO: extend or find better source
OVERLAY_PROPERTIES_WHITELIST: Sequence[str] = ("C:calendar-description", "ICAL:calendar-color", "CR:addressbook-description", "INF:addressbook-color")
OVERLAY_PROPERTIES_WHITELIST: Sequence[str] = ("C:calendar-description", "ICAL:calendar-color", "CR:addressbook-description", "INF:addressbook-color", "D:displayname")
def load(configuration: "config.Configuration") -> "BaseSharing":