mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 22:52:22 +00:00
Some preparations for supporting principal memberships
This commit is contained in:
@@ -55,9 +55,9 @@ impl Resource for CalendarSetResource {
|
||||
|
||||
fn get_user_privileges(&self, user: &User) -> Result<UserPrivilegeSet, Self::Error> {
|
||||
Ok(if self.read_only {
|
||||
UserPrivilegeSet::owner_read(self.principal == user.id)
|
||||
UserPrivilegeSet::owner_read(user.is_principal(&self.principal))
|
||||
} else {
|
||||
UserPrivilegeSet::owner_only(self.principal == user.id)
|
||||
UserPrivilegeSet::owner_only(user.is_principal(&self.principal))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user