1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

feat: only show sdk button to specific roles (#8231)

This aligns it with our expectations we agreed on discovery meeting.
This commit is contained in:
Jaanus Sellin 2024-09-24 12:43:22 +03:00 committed by GitHub
parent 5ac32b3713
commit 7e13e74a3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
</ResponsiveButton>