PROPFIND: only one privilege per privilege element
Before: <privilege><read /><write /></privilege> After: <privilege><read /></privilege><privilege><write /></privilege>
This commit is contained in:
parent
edebcf03c7
commit
a7f12b5fac
@ -669,14 +669,16 @@ def _propfind_response(base_prefix, path, item, props, user, write=False,
|
|||||||
tag.text = _href(base_prefix, ("/%s/" % user) if user else "/")
|
tag.text = _href(base_prefix, ("/%s/" % user) if user else "/")
|
||||||
element.append(tag)
|
element.append(tag)
|
||||||
elif tag == _tag("D", "current-user-privilege-set"):
|
elif tag == _tag("D", "current-user-privilege-set"):
|
||||||
privilege = ET.Element(_tag("D", "privilege"))
|
privileges = [("D", "read")]
|
||||||
if write:
|
if write:
|
||||||
privilege.append(ET.Element(_tag("D", "all")))
|
privileges.append(("D", "all"))
|
||||||
privilege.append(ET.Element(_tag("D", "write")))
|
privileges.append(("D", "write"))
|
||||||
privilege.append(ET.Element(_tag("D", "write-properties")))
|
privileges.append(("D", "write-properties"))
|
||||||
privilege.append(ET.Element(_tag("D", "write-content")))
|
privileges.append(("D", "write-content"))
|
||||||
privilege.append(ET.Element(_tag("D", "read")))
|
for ns, privilege_name in privileges:
|
||||||
element.append(privilege)
|
privilege = ET.Element(_tag("D", "privilege"))
|
||||||
|
privilege.append(ET.Element(_tag(ns, privilege_name)))
|
||||||
|
element.append(privilege)
|
||||||
elif tag == _tag("D", "supported-report-set"):
|
elif tag == _tag("D", "supported-report-set"):
|
||||||
for report_name in (
|
for report_name in (
|
||||||
"principal-property-search", "sync-collection",
|
"principal-property-search", "sync-collection",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user