mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-28 07:57:02 +00:00
Refactor logic for setting/unsetting aliases
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user