mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 19:22:26 +00:00
CalendarStore::is_read_only now refers to its content only and not its metadata
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user