mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 04:42:15 +00:00
Add current-user-pivilege-set
This commit is contained in:
@@ -119,6 +119,7 @@ pub fn generate_propfind_calendar_response(
|
|||||||
"calendar-description",
|
"calendar-description",
|
||||||
"owner",
|
"owner",
|
||||||
"calendar-color",
|
"calendar-color",
|
||||||
|
"current-user-privilege-set",
|
||||||
"max-resource-size",
|
"max-resource-size",
|
||||||
]
|
]
|
||||||
.iter(),
|
.iter(),
|
||||||
@@ -203,6 +204,31 @@ pub fn generate_propfind_calendar_response(
|
|||||||
.create_element("max-resource-size")
|
.create_element("max-resource-size")
|
||||||
.write_text_content(BytesText::new("10000000"))?;
|
.write_text_content(BytesText::new("10000000"))?;
|
||||||
}
|
}
|
||||||
|
"current-user-privilege-set" => {
|
||||||
|
writer
|
||||||
|
.create_element("current-user-privilege-set")
|
||||||
|
// These are just hard-coded for now and will possibly change in the future
|
||||||
|
.write_inner_content(|writer| {
|
||||||
|
for privilege in [
|
||||||
|
"read",
|
||||||
|
"read-acl",
|
||||||
|
"write",
|
||||||
|
"write-acl",
|
||||||
|
"write-content",
|
||||||
|
"read-current-user-privilege-set",
|
||||||
|
"bind",
|
||||||
|
"unbind",
|
||||||
|
] {
|
||||||
|
writer.create_element("privilege").write_inner_content(
|
||||||
|
|writer| {
|
||||||
|
writer.create_element(privilege).write_empty()?;
|
||||||
|
Ok(())
|
||||||
|
},
|
||||||
|
)?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
})?;
|
||||||
|
}
|
||||||
"allprops" => {}
|
"allprops" => {}
|
||||||
_ => invalid_props.push(prop),
|
_ => invalid_props.push(prop),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user