]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove user-caps from RGWOp_User_Modify 43170/head
authorJiffin Tony Thottan <jthottan@redhat.com>
Wed, 15 Sep 2021 09:47:30 +0000 (15:17 +0530)
committerJiffin Tony Thottan <jthottan@redhat.com>
Wed, 15 Sep 2021 16:44:14 +0000 (22:14 +0530)
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 <jthottan@redhat.com>
doc/radosgw/adminops.rst
src/rgw/rgw_rest_user.cc

index 36719887a0f3a861c5122c4afd9b5f4f40cc81e3..2affe8ba181f37b1f3fb967269359f34a65bdd27 100644 (file)
@@ -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.
index 37c13003ec5363cb6b29cda742c4a752206231ac..d6297f547231151dd5d22a4632b192cc62e493cc 100644 (file)
@@ -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, &quota_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);