From 2bbb6391bea5dda260b5150a9dd725a6f7d858dd Mon Sep 17 00:00:00 2001 From: sjaanus Date: Tue, 24 Sep 2024 11:58:35 +0300 Subject: [PATCH] feat: only show sdk button to specific roles --- .../ProjectOnboarding/ProjectOnboarding.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectOnboarding/ProjectOnboarding.tsx b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectOnboarding/ProjectOnboarding.tsx index d708ad410756..cdf47d2b9a2e 100644 --- a/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectOnboarding/ProjectOnboarding.tsx +++ b/frontend/src/component/project/Project/PaginatedProjectFeatureToggles/ProjectOnboarding/ProjectOnboarding.tsx @@ -1,6 +1,9 @@ import { IconButton, styled, Tooltip, Typography } from '@mui/material'; import Add from '@mui/icons-material/Add'; -import { CREATE_FEATURE } from 'component/providers/AccessProvider/permissions'; +import { + UPDATE_PROJECT, + CREATE_PROJECT_API_TOKEN, +} from 'component/providers/AccessProvider/permissions'; import { FlagCreationButton } from '../ProjectFeatureTogglesHeader/ProjectFeatureTogglesHeader'; import ResponsiveButton from 'component/common/ResponsiveButton/ResponsiveButton'; import useProjectOverview from 'hooks/api/getters/useProjectOverview/useProjectOverview'; @@ -150,7 +153,7 @@ export const ProjectOnboarding = ({ projectId={projectId} Icon={Add} disabled={!isFirstFlagCreated} - permission={CREATE_FEATURE} + permission={[UPDATE_PROJECT, CREATE_PROJECT_API_TOKEN]} > Connect SDK