Browse Source

fix(settings): disable allowMemberProjectCreation if no biz plan (#76200)

Cathy Teng 7 months ago
parent
commit
36b5bae5c8
1 changed files with 6 additions and 0 deletions
  1. 6 0
      static/app/data/forms/organizationGeneralSettings.tsx

+ 6 - 0
static/app/data/forms/organizationGeneralSettings.tsx

@@ -96,6 +96,12 @@ const formGroups: JsonFormObject[] = [
         type: 'boolean',
         label: t('Let Members Create Projects'),
         help: t('Allow organization members to create and configure new projects.'),
+        disabled: ({features, access}) =>
+          !access.has('org:write') || features.has('team-roles'),
+        disabledReason: ({features}) =>
+          !features.has('team-roles')
+            ? t('You must be on a business plan to toggle this feature.')
+            : undefined,
       },
       {
         name: 'eventsMemberAdmin',