Remove all that extension business and replace with internal properties

This commit is contained in:
Lennart
2024-11-05 17:22:48 +01:00
parent 4da0ca34c7
commit d5ef6669a6
21 changed files with 176 additions and 264 deletions

View File

@@ -10,7 +10,6 @@ use actix_web::web;
use actix_web::{web::Data, HttpRequest};
use async_trait::async_trait;
use derive_more::derive::{From, Into};
use rustical_dav::extensions::CommonPropertiesProp;
use rustical_dav::privileges::UserPrivilegeSet;
use rustical_dav::resource::{Resource, ResourceService};
use rustical_store::auth::User;
@@ -39,7 +38,7 @@ pub enum AddressbookPropName {
Getctag,
}
#[derive(Default, Deserialize, Serialize, From, PartialEq)]
#[derive(Default, Deserialize, Serialize, PartialEq)]
#[serde(rename_all = "kebab-case")]
pub enum AddressbookProp {
// WebDAV (RFC 2518)
@@ -68,10 +67,6 @@ pub enum AddressbookProp {
// Didn't find the spec
Getctag(String),
#[serde(skip_deserializing, rename = "$value")]
#[from]
ExtCommonProperties(CommonPropertiesProp),
#[serde(other)]
#[default]
Invalid,
@@ -135,7 +130,6 @@ impl Resource for AddressbookResource {
AddressbookProp::SyncToken(_) => Err(rustical_dav::Error::PropReadOnly),
AddressbookProp::Getctag(_) => Err(rustical_dav::Error::PropReadOnly),
AddressbookProp::Invalid => Err(rustical_dav::Error::PropReadOnly),
_ => panic!("we shouldn't end up here"),
}
}