Skip to content

Commit

Permalink
Adding RBAC permissions
Browse files Browse the repository at this point in the history
Signed-off-by: Maayan Hadasi <[email protected]>
  • Loading branch information
mguetta1 committed Jun 2, 2024
1 parent 1c2a094 commit 69ff6b2
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
TableRowContentWithControls,
} from "@app/components/TableControls";
import { CubesIcon, PencilAltIcon } from "@patternfly/react-icons";
import { controlsWriteScopes, RBAC, RBAC_TYPE } from "@app/rbac";

export const BusinessServices: React.FC = () => {
const { t } = useTranslation();
Expand Down Expand Up @@ -192,15 +193,20 @@ export const BusinessServices: React.FC = () => {
<FilterToolbar {...filterToolbarProps} />
<ToolbarGroup variant="button-group">
<ToolbarItem>
<Button
type="button"
id="create-business-service"
aria-label="Create new business service"
variant={ButtonVariant.primary}
onClick={() => setCreateUpdateModalState("create")}
<RBAC
allowedPermissions={controlsWriteScopes}
rbacType={RBAC_TYPE.Scope}
>
{t("actions.createNew")}
</Button>
<Button
type="button"
id="create-business-service"
aria-label="Create new business service"
variant={ButtonVariant.primary}
onClick={() => setCreateUpdateModalState("create")}
>
{t("actions.createNew")}
</Button>
</RBAC>
</ToolbarItem>
</ToolbarGroup>
<ToolbarItem {...paginationToolbarItemProps}>
Expand Down

0 comments on commit 69ff6b2

Please sign in to comment.