]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
RGW - Bucket Remove Op: Pass in user
authorDaniel Gryniewicz <dang@redhat.com>
Wed, 23 Jun 2021 15:31:22 +0000 (11:31 -0400)
committerDaniel Gryniewicz <dang@redhat.com>
Thu, 24 Jun 2021 15:42:45 +0000 (11:42 -0400)
When a bucket remove op is called on the non-master zone, the op is
forwarded to the master zone, but this needs a user, so pass the user
in.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
src/rgw/rgw_rest_bucket.cc

index 8b2e68586c0be1efbc2ca58cd381d51493ad5eb8..18eb322815892efbd5b6b09df0a50494176c969a 100644 (file)
@@ -219,7 +219,9 @@ void RGWOp_Bucket_Remove::execute(optional_yield y)
   RESTArgs::get_string(s, "bucket", bucket_name, &bucket_name);
   RESTArgs::get_bool(s, "purge-objects", false, &delete_children);
 
-  op_ret = store->get_bucket(s, nullptr, string(), bucket_name, &bucket, y);
+  /* FIXME We're abusing the owner of the bucket to pass the user, so that it can be forwarded to
+   * the master.  This user is actually the OP caller, not the bucket owner. */
+  op_ret = store->get_bucket(s, s->user.get(), string(), bucket_name, &bucket, y);
   if (op_ret < 0) {
     ldpp_dout(this, 0) << "get_bucket returned ret=" << op_ret << dendl;
     return;