]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add minssing admin property when sync user info. 30804/head
authorzhang Shaowen <zhangshaowen@cmss.chinamobile.com>
Wed, 4 Sep 2019 06:46:13 +0000 (14:46 +0800)
committerNathan Cutler <ncutler@suse.com>
Wed, 9 Oct 2019 09:38:53 +0000 (11:38 +0200)
Fixes: https://tracker.ceph.com/issues/41643
Signed-off-by: zhang Shaowen <zhangshaowen@cmss.chinamobile.com>
(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

src/rgw/rgw_json_enc.cc

index 0c85a5749686920a63b14c662ef9b9b6e1083a1a..de71a0c9c3c98e67d8c6796d5479949d36fab8d2 100644 (file)
@@ -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);