From 8ff162e7f9f88fb312f24a8a6f7ad75eab229250 Mon Sep 17 00:00:00 2001 From: Jiffin Tony Thottan Date: Wed, 15 Sep 2021 15:17:30 +0530 Subject: [PATCH] rgw: remove user-caps from RGWOp_User_Modify The adminOps API for Modify User checks for user-caps value in the request but does handle that in later code path. Caps have seperate apis add_cap and remove_cap already present to modify exisitng caps in user. Hence removing unused cap variables in RGWOp_User_Modify::execute(). Signed-off-by: Jiffin Tony Thottan --- doc/radosgw/adminops.rst | 7 ------- src/rgw/rgw_rest_user.cc | 3 --- 2 files changed, 10 deletions(-) diff --git a/doc/radosgw/adminops.rst b/doc/radosgw/adminops.rst index 36719887a0f..2affe8ba181 100644 --- a/doc/radosgw/adminops.rst +++ b/doc/radosgw/adminops.rst @@ -603,13 +603,6 @@ Request Parameters :Example: ``s3`` :Required: No -``user-caps`` - -:Description: User capabilities. -:Type: String -:Example: ``usage=read, write; users=read`` -:Required: No - ``max-buckets`` :Description: Specify the maximum number of buckets the user can own. diff --git a/src/rgw/rgw_rest_user.cc b/src/rgw/rgw_rest_user.cc index 37c13003ec5..d6297f54723 100644 --- a/src/rgw/rgw_rest_user.cc +++ b/src/rgw/rgw_rest_user.cc @@ -257,7 +257,6 @@ void RGWOp_User_Modify::execute(optional_yield y) std::string access_key; std::string secret_key; std::string key_type_str; - std::string caps; std::string op_mask_str; std::string default_placement_str; std::string placement_tags_str; @@ -278,7 +277,6 @@ void RGWOp_User_Modify::execute(optional_yield y) RESTArgs::get_string(s, "email", email, &email, &email_set); RESTArgs::get_string(s, "access-key", access_key, &access_key); RESTArgs::get_string(s, "secret-key", secret_key, &secret_key); - RESTArgs::get_string(s, "user-caps", caps, &caps); RESTArgs::get_bool(s, "generate-key", false, &gen_key); RESTArgs::get_bool(s, "suspended", false, &suspended); RESTArgs::get_int32(s, "max-buckets", RGW_DEFAULT_MAX_BUCKETS, &max_buckets, "a_set); @@ -301,7 +299,6 @@ void RGWOp_User_Modify::execute(optional_yield y) if (email_set) op_state.set_user_email(email); - op_state.set_caps(caps); op_state.set_access_key(access_key); op_state.set_secret_key(secret_key);