aboutsummaryrefslogtreecommitdiff
path: root/src/garage/cli/util.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-16 11:47:58 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 12:45:52 +0100
commit0bbb6673e7ce703e470a3c2aad620ee5f009bc84 (patch)
tree844e95b50e2bc129403b679a6c5d63ff82940ad6 /src/garage/cli/util.rs
parent53f71b3a57b3c1828292e26b7865d31e9bec44d6 (diff)
downloadgarage-0bbb6673e7ce703e470a3c2aad620ee5f009bc84.tar.gz
garage-0bbb6673e7ce703e470a3c2aad620ee5f009bc84.zip
Model changes
Diffstat (limited to 'src/garage/cli/util.rs')
-rw-r--r--src/garage/cli/util.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/garage/cli/util.rs b/src/garage/cli/util.rs
index ba88502d..f586d55b 100644
--- a/src/garage/cli/util.rs
+++ b/src/garage/cli/util.rs
@@ -11,6 +11,7 @@ pub fn print_key_info(key: &Key) {
println!("Secret key: {}", key.secret_key);
match &key.state {
Deletable::Present(p) => {
+ println!("Can create buckets: {}", p.allow_create_bucket.get());
println!("\nKey-specific bucket aliases:");
let mut table = vec![];
for (alias_name, _, alias) in p.local_aliases.items().iter() {
@@ -25,7 +26,8 @@ pub fn print_key_info(key: &Key) {
for (b, perm) in p.authorized_buckets.items().iter() {
let rflag = if perm.allow_read { "R" } else { " " };
let wflag = if perm.allow_write { "W" } else { " " };
- table.push(format!("\t{}{}\t{:?}", rflag, wflag, b));
+ let oflag = if perm.allow_owner { "O" } else { " " };
+ table.push(format!("\t{}{}{}\t{:?}", rflag, wflag, oflag, b));
}
format_table(table);
}
@@ -58,7 +60,8 @@ pub fn print_bucket_info(bucket: &Bucket) {
for (k, perm) in p.authorized_keys.items().iter() {
let rflag = if perm.allow_read { "R" } else { " " };
let wflag = if perm.allow_write { "W" } else { " " };
- println!("- {}{} {}", rflag, wflag, k);
+ let oflag = if perm.allow_owner { "O" } else { " " };
+ println!("- {}{}{} {}", rflag, wflag, oflag, k);
}
}
};