sharing/property-overlay: permit and replace displayname
This commit is contained in:
@@ -312,6 +312,8 @@ def xml_propfind_response(
|
|||||||
elif tag == xmlutils.make_clark("RADICALE:displayname"):
|
elif tag == xmlutils.make_clark("RADICALE:displayname"):
|
||||||
# Only for internal use by the web interface
|
# Only for internal use by the web interface
|
||||||
displayname = collection.get_meta("D:displayname")
|
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:
|
if displayname is not None:
|
||||||
element.text = displayname
|
element.text = displayname
|
||||||
else:
|
else:
|
||||||
@@ -324,6 +326,8 @@ def xml_propfind_response(
|
|||||||
is404 = True
|
is404 = True
|
||||||
elif tag == xmlutils.make_clark("D:displayname"):
|
elif tag == xmlutils.make_clark("D:displayname"):
|
||||||
displayname = collection.get_meta("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:
|
if not displayname and is_leaf:
|
||||||
displayname = collection.path
|
displayname = collection.path
|
||||||
if displayname is not None:
|
if displayname is not None:
|
||||||
|
|||||||
@@ -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
|
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":
|
def load(configuration: "config.Configuration") -> "BaseSharing":
|
||||||
|
|||||||
Reference in New Issue
Block a user