diff --git a/frontend/src/components/ACLPage/List/List.tsx b/frontend/src/components/ACLPage/List/List.tsx index 61a443932..ad3737d76 100644 --- a/frontend/src/components/ACLPage/List/List.tsx +++ b/frontend/src/components/ACLPage/List/List.tsx @@ -26,6 +26,7 @@ import ResourcePageHeading from 'components/common/ResourcePageHeading/ResourceP import BreakableTextCell from 'components/common/NewTable/BreakableTextCell'; import { useQueryPersister } from 'components/common/NewTable/ColumnFilter'; import { ActionPermissionWrapper } from 'components/common/ActionComponent'; +import ClusterContext from 'components/contexts/ClusterContext'; import * as S from './List.styled'; @@ -35,6 +36,7 @@ const ACList: React.FC = () => { const [search, setSearch] = useState(searchParams.get('q') || ''); const { data: aclList } = useAcls({ clusterName, search }); const { deleteResource } = useDeleteAcl(clusterName); + const { isReadOnly } = React.useContext(ClusterContext); const modal = useConfirm(true); const theme = useTheme(); const { @@ -198,6 +200,7 @@ const ACList: React.FC = () => { buttonType="primary" buttonSize="M" onClick={openFrom} + disabled={isReadOnly} permission={{ resource: ResourceType.ACL, action: Action.EDIT,