Refactor logic for setting/unsetting aliases

This commit is contained in:
Alex Auvolat
2022-01-03 17:22:40 +01:00
parent 2140cd7205
commit e59c23a69d
5 changed files with 568 additions and 411 deletions
+11
View File
@@ -20,6 +20,17 @@ pub struct BucketKeyPerm {
pub allow_owner: bool,
}
impl BucketKeyPerm {
pub fn no_permissions() -> Self {
Self {
timestamp: 0,
allow_read: false,
allow_write: false,
allow_owner: false,
}
}
}
impl Crdt for BucketKeyPerm {
fn merge(&mut self, other: &Self) {
match other.timestamp.cmp(&self.timestamp) {