expose server version via PROPFIND on root collection and display in the UI for authenticated users
This commit is contained in:
@@ -168,6 +168,8 @@ def xml_propfind_response(
|
||||
props = []
|
||||
# Should list all properties that can be retrieved by the code below
|
||||
props.append(xmlutils.make_clark("D:principal-collection-set"))
|
||||
if user:
|
||||
props.append(xmlutils.make_clark("RADICALE:version"))
|
||||
props.append(xmlutils.make_clark("D:current-user-principal"))
|
||||
props.append(xmlutils.make_clark("D:current-user-privilege-set"))
|
||||
props.append(xmlutils.make_clark("D:supported-report-set"))
|
||||
@@ -467,6 +469,11 @@ def xml_propfind_response(
|
||||
element.append(child_element)
|
||||
else:
|
||||
is404 = True
|
||||
elif tag == xmlutils.make_clark("RADICALE:version"):
|
||||
if user:
|
||||
element.text = utils.package_version("radicale")
|
||||
else:
|
||||
is404 = True
|
||||
else:
|
||||
human_tag = xmlutils.make_human_tag(tag)
|
||||
tag_text = collection.get_meta(human_tag)
|
||||
|
||||
Reference in New Issue
Block a user