dav: Outsource PrincipalResource AT to where it's actually needed

This commit is contained in:
Lennart
2025-04-19 12:43:32 +02:00
parent 54e327d764
commit 8eb46523a3
10 changed files with 34 additions and 11 deletions

View File

@@ -47,10 +47,13 @@ pub struct AddressObjectResource {
pub principal: String,
}
impl CommonPropertiesExtension for AddressObjectResource {
type PrincipalResource = PrincipalResource;
}
impl Resource for AddressObjectResource {
type Prop = AddressObjectPropWrapper;
type Error = Error;
type PrincipalResource = PrincipalResource;
type Principal = User;
fn get_resourcetype(&self) -> Resourcetype {

View File

@@ -80,10 +80,13 @@ impl DavPushExtension for AddressbookResource {
}
}
impl CommonPropertiesExtension for AddressbookResource {
type PrincipalResource = PrincipalResource;
}
impl Resource for AddressbookResource {
type Prop = AddressbookPropWrapper;
type Error = Error;
type PrincipalResource = PrincipalResource;
type Principal = User;
fn get_resourcetype(&self) -> Resourcetype {

View File

@@ -70,10 +70,13 @@ impl NamedRoute for PrincipalResource {
}
}
impl CommonPropertiesExtension for PrincipalResource {
type PrincipalResource = Self;
}
impl Resource for PrincipalResource {
type Prop = PrincipalPropWrapper;
type Error = Error;
type PrincipalResource = PrincipalResource;
type Principal = User;
fn get_resourcetype(&self) -> Resourcetype {