Add feature flag for team account deletion

Updated the team account settings page to support a new feature flag for enabling team deletion. Only the primary user can delete the account if this feature is enabled. Also, corrected the required error message in feature-flags.config.ts file for more clarity.
This commit is contained in:
gbuomprisco
2024-07-22 19:14:48 +02:00
parent 5eefa7ff16
commit 84f838d3a1
4 changed files with 22 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ const FeatureFlagsSchema = z.object({
}),
enableTeamDeletion: z.boolean({
description: 'Enable team deletion.',
required_error: 'Provide the variable NEXT_PUBLIC_ENABLE_TEAM_DELETION',
required_error: 'Provide the variable NEXT_PUBLIC_ENABLE_TEAM_ACCOUNTS_DELETION',
}),
enableTeamAccounts: z.boolean({
description: 'Enable team accounts.',