Add permission guidance if User doesn't have permission to view Objects in bucket (#2448)

This commit is contained in:
jinapurapu
2022-11-15 17:18:37 -08:00
committed by GitHub
parent 4c47b9c3e6
commit f8af10dd26
3 changed files with 21 additions and 6 deletions

View File

@@ -1594,9 +1594,18 @@ const ListObjects = () => {
} ${detailsOpen ? "actionsPanelOpen" : ""}`}
selectedItems={selectedObjects}
onSelect={selectListObjects}
customEmptyMessage={`This location is empty${
!rewindEnabled ? ", please try uploading a new file" : ""
}`}
customEmptyMessage={
!displayListObjects
? permissionTooltipHelper(
[IAM_SCOPES.S3_LIST_BUCKET],
"view Objects in this bucket"
)
: `This location is empty${
!rewindEnabled
? ", please try uploading a new file"
: ""
}`
}
sortConfig={{
currentSort: currentSortField,
currentDirection: sortDirection,

View File

@@ -14,10 +14,14 @@
"arn:aws:s3:::specific-bucket-7/*",
"arn:aws:s3:::specific-bucket-8/*",
"arn:aws:s3:::specific-bucket-9/*",
"arn:aws:s3:::specific-bucket-10/*",
"arn:aws:s3:::specific-bucket-11/*"
"arn:aws:s3:::specific-bucket-10/*"
]
},
{
"Effect": "Allow",
"Action": ["s3:GetBucketLocation", "s3:ListAllMyBuckets"],
"Resource": ["arn:aws:s3:::specific-bucket-11/*"]
},
{
"Effect": "Allow",
"Action": ["s3:CreateBucket"],

View File

@@ -140,7 +140,9 @@ export const groupStatusText = Selector("#group-status");
export const table = Selector(".ReactVirtualized__Table");
export const bucketsTableDisabled = Selector("#object-list-wrapper")
.find(".MuiPaper-root")
.withText("This location is empty, please try uploading a new file");
.withText(
"You require additional permissions in order to view Objects in this bucket. Please ask your MinIO administrator to grant you s3:ListBucket permission in order to view Objects in this bucket."
);
export const createGroupUserTable = Selector(
".MuiDialog-container .ReactVirtualized__Table"
);