diff options
author | Quentin <quentin@deuxfleurs.fr> | 2020-12-14 21:46:49 +0100 |
---|---|---|
committer | Quentin <quentin@deuxfleurs.fr> | 2020-12-14 21:46:49 +0100 |
commit | d0eb6a457f6f83c8f49d262adf6150964a1249b2 (patch) | |
tree | 4b2437a69e11855f83a7a2ac9555372fa54121e1 /src/garage | |
parent | 96388acf230d48877a037b21931f61e2c63d2574 (diff) | |
download | garage-d0eb6a457f6f83c8f49d262adf6150964a1249b2.tar.gz garage-d0eb6a457f6f83c8f49d262adf6150964a1249b2.zip |
Migrate RPC to new schema
Diffstat (limited to 'src/garage')
-rw-r--r-- | src/garage/admin_rpc.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/garage/admin_rpc.rs b/src/garage/admin_rpc.rs index 6ebd04a9..8bf1dec2 100644 --- a/src/garage/admin_rpc.rs +++ b/src/garage/admin_rpc.rs @@ -89,7 +89,7 @@ impl AdminRpcHandler { } bucket .state - .update(BucketState::Present(crdt::LWWMap::new())); + .update(BucketState::Present(BucketParams::new())); bucket } None => Bucket::new(query.name.clone()), @@ -157,6 +157,7 @@ impl AdminRpcHandler { } BucketOperation::Website(query) => { /*let bucket = self.get_existing_bucket(&query.bucket).await?; + if query.allow && query.deny { return Err(Error::Message(format!("Website can not be both allowed and denied on a bucket"))); } @@ -278,7 +279,8 @@ impl AdminRpcHandler { allow_read: bool, allow_write: bool, ) -> Result<(), Error> { - if let BucketState::Present(ak) = bucket.state.get_mut() { + if let BucketState::Present(params) = bucket.state.get_mut() { + let ak = &mut params.authorized_keys; let old_ak = ak.take_and_clear(); ak.merge(&old_ak.update_mutator( key_id.to_string(), |