]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: RemoteApplier::create_account() applies default quota config 24177/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 19 Sep 2018 13:39:39 +0000 (09:39 -0400)
committerCasey Bodley <cbodley@redhat.com>
Wed, 19 Sep 2018 13:57:03 +0000 (09:57 -0400)
rgw users created to shadow users from external auth were missing the
logic to apply their default quota settings

Fixes: http://tracker.ceph.com/issues/24595
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_auth.cc

index d9c4e64ca86c8638d8c28e52b035299ab2b889ab..b50b8b442d39e6daf0bb8893edec67951a1268c1 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "rgw_common.h"
 #include "rgw_auth.h"
+#include "rgw_quota.h"
 #include "rgw_user.h"
 #include "rgw_http_client.h"
 #include "rgw_keystone.h"
@@ -404,6 +405,10 @@ void rgw::auth::RemoteApplier::create_account(const rgw_user& acct_user,
   user_info.user_id = new_acct_user;
   user_info.display_name = info.acct_name;
 
+  user_info.max_buckets = cct->_conf->rgw_user_max_buckets;
+  rgw_apply_default_bucket_quota(user_info.bucket_quota, cct->_conf);
+  rgw_apply_default_user_quota(user_info.user_quota, cct->_conf);
+
   int ret = rgw_store_user_info(store, user_info, nullptr, nullptr,
                                 real_time(), true);
   if (ret < 0) {