]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: allow subuser creation on radosgw-admin user create
authorYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 18 Apr 2012 22:45:09 +0000 (15:45 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 18 Apr 2012 22:45:09 +0000 (15:45 -0700)
This fixes issue #2312: allow the creation of both user
and a subuser in a single radosgw-admin command.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
src/rgw/rgw_admin.cc

index 692f2f83fec772b6be2c3ef0c21a07040629a1ea..4c70feb31bedc214bac35a7a97dc33b08b6953d7 100644 (file)
@@ -744,7 +744,7 @@ int main(int argc, char **argv)
     map<string, RGWSubUser>::iterator iter = info.subusers.find(subuser);
     subuser_found = (iter != info.subusers.end());
 
-    if (!subuser_found && opt_cmd != OPT_SUBUSER_CREATE) {
+    if (!subuser_found && opt_cmd != OPT_SUBUSER_CREATE && opt_cmd != OPT_USER_CREATE) {
       cerr << "subuser specified but was not found, aborting" << std::endl;
       return 1;
     }