Skip to content

Commit

Permalink
Merge pull request ceph#60775 from cbodley/wip-rgw-access-key-active-…
Browse files Browse the repository at this point in the history
…json

rgw: RGWAccessKey::decode_json() preserves default value of 'active'

Reviewed-by: Shilpa Jagannath <[email protected]>
  • Loading branch information
cbodley authored Nov 22, 2024
2 parents c06a9b5 + 8ba6c2d commit 9a50cc0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rgw/rgw_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2994,7 +2994,9 @@ void RGWAccessKey::decode_json(JSONObj *obj) {
subuser = user.substr(pos + 1);
}
}
JSONDecoder::decode_json("active", active, obj);
if (bool tmp = false; JSONDecoder::decode_json("active", tmp, obj)) {
active = tmp; // update only if "active" is present
}
JSONDecoder::decode_json("create_date", create_date, obj);
}

Expand Down

0 comments on commit 9a50cc0

Please sign in to comment.