]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: fix bucket get for s3 account owned bucket 60466/head
authorNizamudeen A <nia@redhat.com>
Fri, 18 Oct 2024 15:20:33 +0000 (20:50 +0530)
committerNizamudeen A <nia@redhat.com>
Mon, 4 Nov 2024 06:58:53 +0000 (12:28 +0530)
commit525bbd7ac5bae418aa957d47b6921d5421f8a191
tree69bc543b60a984f30a8101894031ffff9577503a
parent6702cdbd54a3555edc54d5bed45f3e0f0aba0d87
mgr/dashboard: fix bucket get for s3 account owned bucket

**Issue 1:**

When a bucket is created with a user that is owner by the account user,
it fails to fetch the info for the bucket because the owner of that
bucket is considered as owned by the account rather than the user.

dashboard api try to fetch some info for the bucket on the basis of the
bucket owner which in this case fails since its not a real user.

To keep the existing behavior as it is and fix the current issue, I am
doing a check to make sure the user id exists or not. if it doesn't
exist, we goes on to fetch using the dashboard user.

**Issue 2**
Editing the bucket owner by the account is broken. So disabling the
ownership change for the bucket owned by account until we have user
account management for rgw in the dashboard

Fixes: https://tracker.ceph.com/issues/68622
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit dd4549238e525d371414538bb43e8333af19cb96)

 Conflicts:
src/pybind/mgr/dashboard/controllers/rgw.py
 - remove imports for multisite-automation
src/pybind/mgr/dashboard/services/service.py
 - this file is not part of squid. hence the user parameter is added to
   rgw_client.py instead where it originally was
src/pybind/mgr/dashboard/controllers/rgw.py
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-bucket-form/rgw-bucket-form.component.ts
src/pybind/mgr/dashboard/openapi.yaml
src/pybind/mgr/dashboard/services/rgw_client.py
src/pybind/mgr/dashboard/services/rgw_iam.py [new file with mode: 0644]