ACL method and reports

This commit is contained in:
mdecimus
2025-03-27 19:40:12 +01:00
parent 3f825aaafd
commit a5e6f77b26
24 changed files with 742 additions and 125 deletions

View File

@@ -170,6 +170,18 @@ impl Display for ReportSet {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ReportSet::SyncCollection => write!(f, "<D:sync-collection/>"),
ReportSet::ExpandProperty => write!(f, "<D:expand-property/>"),
ReportSet::AddressbookQuery => write!(f, "<C:addressbook-query/>"),
ReportSet::AddressbookMultiGet => write!(f, "<C:addressbook-multiget/>"),
ReportSet::CalendarQuery => write!(f, "<C:calendar-query/>"),
ReportSet::CalendarMultiGet => write!(f, "<C:calendar-multiget/>"),
ReportSet::FreeBusyQuery => write!(f, "<C:free-busy-query/>"),
ReportSet::AclPrincipalPropSet => write!(f, "<D:acl-principal-prop-set/>"),
ReportSet::PrincipalMatch => write!(f, "<D:principal-match/>"),
ReportSet::PrincipalPropertySearch => write!(f, "<D:principal-property-search/>"),
ReportSet::PrincipalSearchPropertySet => {
write!(f, "<D:principal-search-property-set/>")
}
}
}
}

View File

@@ -160,6 +160,16 @@ pub enum DavValue {
#[cfg_attr(test, derive(serde::Serialize, serde::Deserialize))]
pub enum ReportSet {
SyncCollection,
ExpandProperty,
AddressbookQuery,
AddressbookMultiGet,
CalendarQuery,
CalendarMultiGet,
FreeBusyQuery,
AclPrincipalPropSet,
PrincipalMatch,
PrincipalPropertySearch,
PrincipalSearchPropertySet,
}
#[derive(Debug, Clone, PartialEq, Eq)]

View File

@@ -338,3 +338,9 @@ impl ArchivedDeadProperty {
}
}
}
impl PropertyUpdate {
pub fn has_changes(&self) -> bool {
!self.set.is_empty() || !self.remove.is_empty()
}
}

View File

@@ -55,7 +55,7 @@ pub struct SyncToken(pub String);
#[repr(transparent)]
pub struct Href(pub String);
#[derive(Debug, Clone, PartialEq, Eq)]
#[derive(Debug, Default, Clone, PartialEq, Eq)]
#[cfg_attr(test, derive(serde::Serialize, serde::Deserialize))]
#[repr(transparent)]
pub struct List<T: Display>(pub Vec<T>);