Skip to content

Commit

Permalink
EVEREST-1408-restore-btn-rbac: fix of rbac permission for restore men…
Browse files Browse the repository at this point in the history
…u item (#639)

Co-authored-by: Oksana Grishchenko <[email protected]>
  • Loading branch information
solovevayaroslavna and oksana-grishchenko authored Sep 6, 2024
1 parent c2e2328 commit 9741f68
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,16 @@ export const BackupActionButtons = (
namespace: dbCluster.metadata.namespace,
});

const { canUpdate: canUpdateDb } = useGetPermissions({
resource: 'database-clusters',
specificResource: dbCluster.metadata.name,
namespace: dbCluster.metadata.namespace,
});

const { canCreate: canCreateDb } = useGetPermissions({
resource: 'database-clusters',
});
const { canCreate: canCreateRestore } = useGetPermissions({
resource: 'database-cluster-restores',
namespace: dbCluster.metadata.namespace,
});

return [
...(canUpdateDb
...(canCreateRestore
? [
<MenuItem
key={0}
Expand Down

0 comments on commit 9741f68

Please sign in to comment.