diff options
author | Casey Bodley <cbodley@redhat.com> | 2023-11-10 18:31:11 +0100 |
---|---|---|
committer | Casey Bodley <cbodley@redhat.com> | 2024-04-10 19:09:14 +0200 |
commit | 65c80d7e63f12a76857726bab929261717adb75b (patch) | |
tree | d78d28ddbbf7c3a6ee082ce1fd786c29b81532da /src/rgw/rgw_rest_s3.cc | |
parent | rgw/acl: use rgw_owner for ACLOwner (diff) | |
download | ceph-65c80d7e63f12a76857726bab929261717adb75b.tar.xz ceph-65c80d7e63f12a76857726bab929261717adb75b.zip |
rgw: use rgw_owner in RGWBucketInfo
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Diffstat (limited to 'src/rgw/rgw_rest_s3.cc')
-rw-r--r-- | src/rgw/rgw_rest_s3.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 495651f89d6..0f77c2f9b01 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -2349,9 +2349,9 @@ static void dump_bucket_metadata(req_state *s, rgw::sal::Bucket* bucket, dump_header(s, "X-RGW-Bytes-Used", static_cast<long long>(stats.size)); // only bucket's owner is allowed to get the quota settings of the account - if (bucket->get_owner() == s->user->get_id()) { - auto user_info = s->user->get_info(); - auto bucket_quota = s->bucket->get_info().quota; // bucket quota + if (s->auth.identity->is_owner_of(bucket->get_owner())) { + const auto& user_info = s->user->get_info(); + const auto& bucket_quota = s->bucket->get_info().quota; // bucket quota dump_header(s, "X-RGW-Quota-User-Size", static_cast<long long>(user_info.quota.user_quota.max_size)); dump_header(s, "X-RGW-Quota-User-Objects", static_cast<long long>(user_info.quota.user_quota.max_objects)); dump_header(s, "X-RGW-Quota-Max-Buckets", static_cast<long long>(user_info.max_buckets)); |