Skip to content

Commit 5382ef6

Browse files
authored
FE: Fix Create ACL button available for r/o clusters (#1314)
1 parent d285a69 commit 5382ef6

File tree

1 file changed

+3
-0
lines changed
  • frontend/src/components/ACLPage/List

1 file changed

+3
-0
lines changed

frontend/src/components/ACLPage/List/List.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import ResourcePageHeading from 'components/common/ResourcePageHeading/ResourceP
2626
import BreakableTextCell from 'components/common/NewTable/BreakableTextCell';
2727
import { useQueryPersister } from 'components/common/NewTable/ColumnFilter';
2828
import { ActionPermissionWrapper } from 'components/common/ActionComponent';
29+
import ClusterContext from 'components/contexts/ClusterContext';
2930

3031
import * as S from './List.styled';
3132

@@ -35,6 +36,7 @@ const ACList: React.FC = () => {
3536
const [search, setSearch] = useState(searchParams.get('q') || '');
3637
const { data: aclList } = useAcls({ clusterName, search });
3738
const { deleteResource } = useDeleteAcl(clusterName);
39+
const { isReadOnly } = React.useContext(ClusterContext);
3840
const modal = useConfirm(true);
3941
const theme = useTheme();
4042
const {
@@ -198,6 +200,7 @@ const ACList: React.FC = () => {
198200
buttonType="primary"
199201
buttonSize="M"
200202
onClick={openFrom}
203+
disabled={isReadOnly}
201204
permission={{
202205
resource: ResourceType.ACL,
203206
action: Action.EDIT,

0 commit comments

Comments
 (0)