Skip to content

Commit

Permalink
Merge pull request #30604 from vumrao/wip-vumrao-41976
Browse files Browse the repository at this point in the history
nautilus: radosgw-admin: add --uid check in bucket list command

Reviewed-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
yuriw committed Oct 3, 2019
2 parents 2306d9b + e2db5a7 commit 93f9b02
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/rgw/rgw_admin.cc
Expand Up @@ -2897,6 +2897,10 @@ int main(int argc, const char **argv)
break;
} else if (ceph_argparse_witharg(args, i, &val, "-i", "--uid", (char*)NULL)) {
user_id.from_str(val);
if (user_id.empty()) {
cerr << "no value for uid" << std::endl;
exit(1);
}
} else if (ceph_argparse_witharg(args, i, &val, "--tenant", (char*)NULL)) {
tenant = val;
} else if (ceph_argparse_witharg(args, i, &val, "--access-key", (char*)NULL)) {
Expand Down Expand Up @@ -5462,6 +5466,12 @@ int main(int argc, const char **argv)

if (opt_cmd == OPT_BUCKETS_LIST) {
if (bucket_name.empty()) {
if (!user_id.empty()) {
if (!user_op.has_existing_user()) {
cerr << "ERROR: could not find user: " << user_id << std::endl;
return -ENOENT;
}
}
RGWBucketAdminOp::info(store, bucket_op, f);
} else {
RGWBucketInfo bucket_info;
Expand Down

0 comments on commit 93f9b02

Please sign in to comment.