CalendarStore::is_read_only now refers to its content only and not its metadata

This commit is contained in:
Lennart
2025-11-02 21:07:06 +01:00
parent 5cdbb3b9d3
commit 425d10cb99
2 changed files with 2 additions and 6 deletions

View File

@@ -317,16 +317,11 @@ impl Resource for CalendarResource {
}
fn get_user_privileges(&self, user: &Principal) -> Result<UserPrivilegeSet, Self::Error> {
if self.cal.subscription_url.is_some() {
if self.cal.subscription_url.is_some() || self.read_only {
return Ok(UserPrivilegeSet::owner_write_properties(
user.is_principal(&self.cal.principal),
));
}
if self.read_only {
return Ok(UserPrivilegeSet::owner_read(
user.is_principal(&self.cal.principal),
));
}
Ok(UserPrivilegeSet::owner_only(
user.is_principal(&self.cal.principal),

View File

@@ -98,5 +98,6 @@ pub trait CalendarStore: Send + Sync + 'static {
object_id: &str,
) -> Result<(), Error>;
// read_only refers to objects, metadata may still be updated
fn is_read_only(&self, cal_id: &str) -> bool;
}