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:
@@ -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 />}
|
||||
|
||||
Reference in New Issue
Block a user