Skip to content

Commit 8fde9f3

Browse files
committed
FE: Fix create ACL button RBAC check
1 parent f4459a7 commit 8fde9f3

File tree

1 file changed

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

1 file changed

+13
-3
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@ import useAppParams from 'lib/hooks/useAppParams';
77
import { useAcls, useDeleteAcl } from 'lib/hooks/api/acl';
88
import { ClusterName } from 'lib/interfaces/cluster';
99
import {
10+
Action,
1011
KafkaAcl,
1112
KafkaAclNamePatternType,
1213
KafkaAclPermissionEnum,
14+
ResourceType,
1315
} from 'generated-sources';
1416
import useBoolean from 'lib/hooks/useBoolean';
15-
import { Button } from 'components/common/Button/Button';
1617
import ACLForm from 'components/ACLPage/Form/Form';
1718
import DeleteIcon from 'components/common/Icons/DeleteIcon';
1819
import { useTheme } from 'styled-components';
1920
import ACLFormContext from 'components/ACLPage/Form/AclFormContext';
2021
import PlusIcon from 'components/common/Icons/PlusIcon';
22+
import ActionButton from 'components/common/ActionComponent/ActionButton/ActionButton';
2123

2224
import * as S from './List.styled';
2325

@@ -148,9 +150,17 @@ const ACList: React.FC = () => {
148150
return (
149151
<S.Container>
150152
<PageHeading text="Access Control List">
151-
<Button buttonType="primary" buttonSize="M" onClick={openFrom}>
153+
<ActionButton
154+
buttonType="primary"
155+
buttonSize="M"
156+
onClick={openFrom}
157+
permission={{
158+
resource: ResourceType.ACL,
159+
action: Action.EDIT,
160+
}}
161+
>
152162
<PlusIcon /> Create ACL
153-
</Button>
163+
</ActionButton>
154164
</PageHeading>
155165
<Table
156166
columns={columns}

0 commit comments

Comments
 (0)