Skip to content

Commit

Permalink
Merge pull request ceph#53750 from Inode1/rgw-user-policy-check-subuser
Browse files Browse the repository at this point in the history
rgw: fix user.rgw.user-policy attr remove by modify user

Reviewed-by: Daniel Gryniewicz <[email protected]>
  • Loading branch information
ivancich authored Oct 19, 2023
2 parents 1afba5c + e66e0b1 commit 5b9fc05
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/rgw/driver/rados/rgw_user.cc
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ void RGWUserAdminOpState::set_user_version_tracker(RGWObjVersionTracker& objv_tr
user->get_version_tracker() = objv_tracker;
}

void RGWUserAdminOpState::set_attrs(rgw::sal::Attrs& attrs)
{
user->get_attrs() = attrs;
}

rgw::sal::Attrs RGWUserAdminOpState::get_attrs() {
return user->get_attrs();
}

const rgw_user& RGWUserAdminOpState::get_user_id()
{
return user->get_id();
Expand Down Expand Up @@ -1386,6 +1395,7 @@ int RGWUser::init(const DoutPrefixProvider *dpp, RGWUserAdminOpState& op_state,

op_state.set_existing_user(found);
if (found) {
op_state.set_attrs(user->get_attrs());
op_state.set_user_info(user->get_info());
op_state.set_populated();
op_state.objv = user->get_version_tracker();
Expand Down
4 changes: 4 additions & 0 deletions src/rgw/driver/rados/rgw_user.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ struct RGWUserAdminOpState {
max_buckets_specified = true;
}

rgw::sal::Attrs get_attrs();

void set_attrs(rgw::sal::Attrs& attrs);

void set_gen_access() {
gen_access = true;
key_op = true;
Expand Down

0 comments on commit 5b9fc05

Please sign in to comment.