Add permission guidance if User doesn't have permission to view Objects in bucket (#2448)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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"],
|
||||
|
||||
@@ -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"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user