From b49517769c99d182cd9cc0da0e486ce545cd2dde Mon Sep 17 00:00:00 2001 From: Ugo Palatucci Date: Wed, 6 Nov 2024 14:04:56 +0100 Subject: [PATCH] CNV-50786: fix accessReview on migration action --- .../components/ActionDropdownItem/ActionDropdownItem.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/components/ActionDropdownItem/ActionDropdownItem.tsx b/src/utils/components/ActionDropdownItem/ActionDropdownItem.tsx index e15fb1c03..66051dbac 100644 --- a/src/utils/components/ActionDropdownItem/ActionDropdownItem.tsx +++ b/src/utils/components/ActionDropdownItem/ActionDropdownItem.tsx @@ -16,7 +16,9 @@ type ActionDropdownItemProps = { const ActionDropdownItem: FC = ({ action, setIsOpen }) => { const { t } = useKubevirtTranslation(); - const [actionAllowed] = useAccessReview(action?.accessReview || {}); + const [accessReview] = useAccessReview(action?.accessReview || {}); + + const actionAllowed = accessReview || action?.accessReview === undefined; const isCloneDisabled = !actionAllowed && action?.id === 'vm-action-clone'; const handleClick = () => {