Skip to content

Commit

Permalink
chore: Apply no template limit feature flag to some new users
Browse files Browse the repository at this point in the history
  • Loading branch information
Dschoordsch committed Nov 7, 2023
1 parent 27a9efb commit 43269bf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/server/graphql/mutations/helpers/bootstrapNewUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const bootstrapNewUser = async (

const experimentalFlags = [...featureFlags]

// Retros in disguise
const domainUserHasRidFlag = usersWithDomain.some((user) =>
user.featureFlags.includes('retrosInDisguise')
)
Expand All @@ -64,6 +65,16 @@ const bootstrapNewUser = async (
experimentalFlags.push('signUpDestinationTeam')
}

// No template limit
const domainUserHasNoTemplateLimitFlag = usersWithDomain.some((user) =>
user.featureFlags.includes('noTemplateLimit')
)
if (domainUserHasNoTemplateLimitFlag) {
experimentalFlags.push('noTemplateLimit')
} else if (Math.random() < 0.5) {
experimentalFlags.push('noTemplateLimit')
}

const isVerified = identities.some((identity) => identity.isEmailVerified)
const orgIds = organizations.map(({id}) => id)

Expand Down

0 comments on commit 43269bf

Please sign in to comment.