fix(caldav): Fix permissions to allow for deletion of calendar subscriptions

fixes #84
This commit is contained in:
Lennart
2025-06-23 14:04:09 +02:00
parent e5687c6e43
commit 79c66a0b46
3 changed files with 35 additions and 2 deletions

View File

@@ -47,8 +47,9 @@ pub async fn route_delete<R: ResourceService>(
) -> Result<(), R::Error> {
let resource = resource_service.get_resource(path_components).await?;
// Kind of a bodge since we don't get unbind from the parent
let privileges = resource.get_user_privileges(principal)?;
if !privileges.has(&UserPrivilege::Write) {
if !privileges.has(&UserPrivilege::WriteProperties) {
return Err(Error::Unauthorized.into());
}