Support read-only calendar store as preparation for birthday calendars

This commit is contained in:
Lennart
2025-01-06 17:28:40 +01:00
parent 357b115c62
commit 6a7e839f35
6 changed files with 76 additions and 29 deletions

View File

@@ -63,6 +63,16 @@ impl UserPrivilegeSet {
Self::default()
}
}
pub fn read_only() -> Self {
Self {
privileges: HashSet::from([
UserPrivilege::Read,
UserPrivilege::ReadAcl,
UserPrivilege::ReadCurrentUserPrivilegeSet,
]),
}
}
}
impl<const N: usize> From<[UserPrivilege; N]> for UserPrivilegeSet {