aboutsummaryrefslogtreecommitdiff
path: root/src/model/permission.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/permission.rs')
-rw-r--r--src/model/permission.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/model/permission.rs b/src/model/permission.rs
index ebb24a32..b8f7dd71 100644
--- a/src/model/permission.rs
+++ b/src/model/permission.rs
@@ -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) {