mirror of
https://github.com/ceph/ceph
synced 2025-01-19 09:32:00 +00:00
Merge pull request #7301 from oritwas/wip-14375
rgw: fix subuser rm command failure Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
commit
eea2689b9e
@ -1428,14 +1428,17 @@ int RGWSubUserPool::execute_remove(RGWUserAdminOpState& op_state,
|
||||
|
||||
map<std::string, RGWSubUser>::iterator siter;
|
||||
siter = subuser_map->find(subuser_str);
|
||||
|
||||
if (siter == subuser_map->end()){
|
||||
set_err_msg(err_msg, "subuser not found: " + subuser_str);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (!op_state.has_existing_subuser()) {
|
||||
set_err_msg(err_msg, "subuser not found: " + subuser_str);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
// always purge all associate keys
|
||||
user->keys.remove_subuser_keys(op_state, &subprocess_msg, defer_user_update);
|
||||
user->keys.remove_subuser_keys(op_state, &subprocess_msg, true);
|
||||
|
||||
// remove the subuser from the user info
|
||||
subuser_map->erase(siter);
|
||||
|
Loading…
Reference in New Issue
Block a user