changes around extensions

This commit is contained in:
Lennart
2024-11-04 19:19:54 +01:00
parent c41e3e3abb
commit 0d2e07fb65
10 changed files with 53 additions and 79 deletions

View File

@@ -4,8 +4,7 @@ use actix_web::{dev::ResourceMap, web::Data, HttpRequest};
use async_trait::async_trait;
use derive_more::derive::{From, Into, TryInto};
use rustical_dav::{
extension::BoxedExtension,
extensions::{CommonPropertiesExtension, CommonPropertiesProp},
extensions::CommonPropertiesProp,
privileges::UserPrivilegeSet,
resource::{InvalidProperty, Resource, ResourceService},
};
@@ -44,7 +43,7 @@ pub enum CalendarObjectProp {
#[serde(skip_deserializing, untagged)]
#[from]
#[try_into]
ExtCommonProperties(CommonPropertiesProp<CalendarObjectResource>),
ExtCommonProperties(CommonPropertiesProp<Resourcetype>),
#[serde(untagged)]
Invalid,
@@ -73,14 +72,9 @@ impl Resource for CalendarObjectResource {
type PropName = CalendarObjectPropName;
type Prop = CalendarObjectProp;
type Error = Error;
type PrincipalResource = PrincipalResource;
type ResourceType = Resourcetype;
fn list_extensions() -> Vec<BoxedExtension<Self>> {
vec![BoxedExtension::from_ext(CommonPropertiesExtension::<
PrincipalResource,
>::default())]
}
fn get_prop(
&self,
_rmap: &ResourceMap,