From: zhang Shaowen Date: Wed, 4 Sep 2019 06:46:13 +0000 (+0800) Subject: rgw: add minssing admin property when sync user info. X-Git-Tag: v13.2.9~76^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb2e9473bec56c87c75275f4b8694e0336a4ed7f;p=ceph.git rgw: add minssing admin property when sync user info. Fixes: https://tracker.ceph.com/issues/41643 Signed-off-by: zhang Shaowen (cherry picked from commit 9ad975d422aba67c0bf7bc1b114079331e2f7fd5) Conflicts: src/rgw/rgw_json_enc.cc - trivial resolution src/rgw/rgw_user.cc - modification to "static void dump_user_info()" dropped because it changes code that was added by d2c02b37e3a7 which is not being backported --- diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index 0c85a574968..de71a0c9c3c 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -472,6 +472,9 @@ void RGWUserInfo::dump(Formatter *f) const if (system) { /* no need to show it for every user */ encode_json("system", (bool)system, f); } + if (admin) { + encode_json("admin", (bool)admin, f); + } encode_json("default_placement", default_placement, f); encode_json("placement_tags", placement_tags, f); encode_json("bucket_quota", bucket_quota, f); @@ -550,7 +553,9 @@ void RGWUserInfo::decode_json(JSONObj *obj) bool sys = false; JSONDecoder::decode_json("system", sys, obj); system = (__u8)sys; + bool ad = false; JSONDecoder::decode_json("default_placement", default_placement, obj); + admin = (__u8)ad; JSONDecoder::decode_json("placement_tags", placement_tags, obj); JSONDecoder::decode_json("bucket_quota", bucket_quota, obj); JSONDecoder::decode_json("user_quota", user_quota, obj);