diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index 85b35947e93..c0fa13b31fa 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -484,6 +484,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.name, f); encode_json("default_storage_class", default_placement.storage_class, f); encode_json("placement_tags", placement_tags, f); @@ -562,6 +565,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("admin", ad, obj); + admin = (__u8)ad; JSONDecoder::decode_json("default_placement", default_placement.name, obj); JSONDecoder::decode_json("default_storage_class", default_placement.storage_class, obj); JSONDecoder::decode_json("placement_tags", placement_tags, obj); diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 081f21760e9..359237c6eca 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -420,6 +420,7 @@ static void dump_user_info(Formatter *f, RGWUserInfo &info, op_type_to_str(info.op_mask, buf, sizeof(buf)); encode_json("op_mask", (const char *)buf, f); encode_json("system", (bool)info.system, f); + encode_json("admin", (bool)info.admin, f); encode_json("default_placement", info.default_placement.name, f); encode_json("default_storage_class", info.default_placement.storage_class, f); encode_json("placement_tags", info.placement_tags, f);