]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: modify_s3_type_subuser_access_permissions_fail_through_admin_rest_api 18641/head
authoryuliyang <yuliyang@cmss.chinamobile.com>
Tue, 31 Oct 2017 06:20:14 +0000 (14:20 +0800)
committeryuliyang <yuliyang@cmss.chinamobile.com>
Tue, 31 Oct 2017 06:39:18 +0000 (14:39 +0800)
fix: http://tracker.ceph.com/issues/21983

Signed-off-by: yuliyang <yuliyang@cmss.chinamobile.com>
src/rgw/rgw_rest_user.cc

index c8d8dd74265c8ed116d53699d65e717d2deb7c87..906daa173d71df38d8d55d657064e2e6c2dc64ff 100644 (file)
@@ -418,8 +418,12 @@ void RGWOp_Subuser_Modify::execute()
 
   op_state.set_user_id(uid);
   op_state.set_subuser(subuser);
-  op_state.set_secret_key(secret_key);
-  op_state.set_gen_secret();
+
+  if (!secret_key.empty())
+    op_state.set_secret_key(secret_key);
+
+  if (gen_secret)
+    op_state.set_gen_secret();
 
   if (!key_type_str.empty()) {
     if (key_type_str.compare("swift") == 0)