]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_sync_module_es_rest.cc
import 15.2.0 Octopus source
[ceph.git] / ceph / src / rgw / rgw_sync_module_es_rest.cc
index 751d822085f26b7eafb56e620b5be2cb70f2d167..1abeaeb83d5a9bf0f309dc2bfdc209b6314a252a 100644 (file)
@@ -1,5 +1,5 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab
+// vim: ts=8 sw=2 smarttab ft=cpp
 
 #include "rgw_sync_module_es.h"
 #include "rgw_sync_module_es_rest.h"
@@ -165,8 +165,8 @@ void RGWMetadataSearchOp::execute()
 
   list<pair<string, string> > conds;
 
-  if (!s->user->system) {
-    conds.push_back(make_pair("permissions", s->user->user_id.to_str()));
+  if (!s->user->get_info().system) {
+    conds.push_back(make_pair("permissions", s->user->get_id().to_str()));
   }
 
   if (!s->bucket_name.empty()) {
@@ -263,8 +263,8 @@ void RGWMetadataSearchOp::execute()
 
   try {
     decode_json_obj(response, &jparser);
-  } catch (JSONDecoder::err& e) {
-    ldout(s->cct, 0) << "ERROR: failed to decode JSON input: " << e.message << dendl;
+  } catch (const JSONDecoder::err& e) {
+    ldout(s->cct, 0) << "ERROR: failed to decode JSON input: " << e.what() << dendl;
     op_ret = -EINVAL;
     return;
   }
@@ -379,7 +379,7 @@ class RGWHandler_REST_MDSearch_S3 : public RGWHandler_REST_S3 {
 protected:
   RGWOp *op_get() override {
     if (s->info.args.exists("query")) {
-      return new RGWMetadataSearch_ObjStore_S3(store->get_sync_module());
+      return new RGWMetadataSearch_ObjStore_S3(store->getRados()->get_sync_module());
     }
     if (!s->init_state.url_bucket.empty() &&
         s->info.args.exists("mdsearch")) {