diff --git a/static/app/views/settings/dynamicSampling/index.tsx b/static/app/views/settings/dynamicSampling/index.tsx index bd8fea53b4d662..f8098df7fc54f1 100644 --- a/static/app/views/settings/dynamicSampling/index.tsx +++ b/static/app/views/settings/dynamicSampling/index.tsx @@ -16,14 +16,11 @@ import useOrganization from 'sentry/utils/useOrganization'; import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader'; import {OrganizationSampling} from 'sentry/views/settings/dynamicSampling/organizationSampling'; import {ProjectSampling} from 'sentry/views/settings/dynamicSampling/projectSampling'; -import { - useHasDynamicSamplingReadAccess, - useHasDynamicSamplingWriteAccess, -} from 'sentry/views/settings/dynamicSampling/utils/access'; +import {useHasDynamicSamplingReadAccess} from 'sentry/views/settings/dynamicSampling/utils/access'; +import {OrganizationPermissionAlert} from 'sentry/views/settings/organization/organizationPermissionAlert'; export default function DynamicSamplingSettings() { const organization = useOrganization(); - const hasWriteAccess = useHasDynamicSamplingWriteAccess(); const hasReadAccess = useHasDynamicSamplingReadAccess(); if ( @@ -86,15 +83,7 @@ export default function DynamicSamplingSettings() { } /> - {!hasWriteAccess && ( - - - {t( - 'These settings can only be edited by users with the organization owner or manager role.' - )} - - - )} + {hasReadAccess ? ( diff --git a/static/app/views/settings/project/projectPermissionAlert.tsx b/static/app/views/settings/project/projectPermissionAlert.tsx index c0ae18336853aa..07a7d495af96d2 100644 --- a/static/app/views/settings/project/projectPermissionAlert.tsx +++ b/static/app/views/settings/project/projectPermissionAlert.tsx @@ -22,7 +22,12 @@ export function ProjectPermissionAlert({ {({hasAccess}) => !hasAccess && ( - + {t( 'These settings can only be edited by users with the organization-level owner, manager, or team-level admin roles.' )} diff --git a/static/app/views/settings/projectSeer/index.tsx b/static/app/views/settings/projectSeer/index.tsx index b756190198af85..9db170d4e5e389 100644 --- a/static/app/views/settings/projectSeer/index.tsx +++ b/static/app/views/settings/projectSeer/index.tsx @@ -22,6 +22,7 @@ import {setApiQueryData} from 'sentry/utils/queryClient'; import useOrganization from 'sentry/utils/useOrganization'; import {getPricingDocsLinkForEventType} from 'sentry/views/settings/account/notifications/utils'; import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader'; +import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermissionAlert'; import {AutofixRepositories} from './autofixRepositories'; @@ -226,13 +227,7 @@ function ProjectSeerGeneralForm({project}: ProjectSeerProps) { } )} - {!canWriteProject && ( - - {t( - 'These settings can only be edited by users with the organization-level owner, manager, or team-level admin role.' - )} - - )} + {showWarning && ( {t(