Fix enable/disable delete button for object (#1745)

- Pass the right resource to SecureComponent wrapper for delete button,
  bucket/object-full-path-including-prefix

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
Lenin Alevski
2022-03-22 13:36:20 -07:00
committed by GitHub
parent 2321343d5e
commit d1d39df71e

View File

@@ -539,11 +539,9 @@ const ObjectDetailPanel = ({
<Grid item xs={12} sx={{ textAlign: "center" }}>
<SecureComponent
resource={bucketName}
resource={[currentItem, [bucketName, actualInfo.name].join("/")]}
scopes={[IAM_SCOPES.S3_DELETE_OBJECT]}
matchAll
errorProps={{ disabled: true }}
containsResource
>
<Button
startIcon={<DeleteIcon />}