]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/pubsub: forward requests as s->owner instead of s->user
authorCasey Bodley <cbodley@redhat.com>
Thu, 28 Mar 2024 19:26:10 +0000 (15:26 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 10 Apr 2024 17:09:17 +0000 (13:09 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_rest_pubsub.cc

index ca54d0c324f85f54a3075c4294e3aae971c4c254..bf72baac13ea13413aef030727afe0f86d299436 100644 (file)
@@ -378,7 +378,7 @@ void RGWPSCreateTopicOp::execute(optional_yield y) {
   // master request will replicate the topic creation.
   if (!driver->is_meta_master()) {
     op_ret = rgw_forward_request_to_master(
-        this, *s->penv.site, s->user->get_id(), &bl_post_body, nullptr, s->info, y);
+        this, *s->penv.site, s->owner.id, &bl_post_body, nullptr, s->info, y);
     if (op_ret < 0) {
       ldpp_dout(this, 4)
           << "CreateTopic forward_request_to_master returned ret = " << op_ret
@@ -837,7 +837,7 @@ class RGWPSSetTopicAttributesOp : public RGWOp {
 void RGWPSSetTopicAttributesOp::execute(optional_yield y) {
   if (!driver->is_meta_master()) {
     op_ret = rgw_forward_request_to_master(
-        this, *s->penv.site, s->user->get_id(), &bl_post_body, nullptr, s->info, y);
+        this, *s->penv.site, s->owner.id, &bl_post_body, nullptr, s->info, y);
     if (op_ret < 0) {
       ldpp_dout(this, 4)
           << "SetTopicAttributes forward_request_to_master returned ret = "
@@ -982,7 +982,7 @@ class RGWPSDeleteTopicOp : public RGWOp {
 void RGWPSDeleteTopicOp::execute(optional_yield y) {
   if (!driver->is_meta_master()) {
     op_ret = rgw_forward_request_to_master(
-        this, *s->penv.site, s->user->get_id(), &bl_post_body, nullptr, s->info, y);
+        this, *s->penv.site, s->owner.id, &bl_post_body, nullptr, s->info, y);
     if (op_ret < 0) {
       ldpp_dout(this, 1)
           << "DeleteTopic forward_request_to_master returned ret = " << op_ret
@@ -1234,7 +1234,7 @@ int RGWPSCreateNotifOp::verify_permission(optional_yield y) {
 void RGWPSCreateNotifOp::execute(optional_yield y) {
   if (!driver->is_meta_master()) {
     op_ret = rgw_forward_request_to_master(
-        this, *s->penv.site, s->user->get_id(), &data, nullptr, s->info, y);
+        this, *s->penv.site, s->owner.id, &data, nullptr, s->info, y);
     if (op_ret < 0) {
       ldpp_dout(this, 4) << "CreateBucketNotification "
                             "forward_request_to_master returned ret = "
@@ -1436,7 +1436,7 @@ void RGWPSDeleteNotifOp::execute(optional_yield y) {
   if (!driver->is_meta_master()) {
     bufferlist indata;
     op_ret = rgw_forward_request_to_master(
-        this, *s->penv.site, s->user->get_id(), &indata, nullptr, s->info, y);
+        this, *s->penv.site, s->owner.id, &indata, nullptr, s->info, y);
     if (op_ret < 0) {
       ldpp_dout(this, 4) << "DeleteBucketNotification "
                             "forward_request_to_master returned error ret= "