Skip to content

Commit

Permalink
feat(gatekeeper): allow license bypass in testing envs (#2663)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedlicska authored Aug 19, 2024
1 parent 376d6ce commit 35d3942
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import * as jose from 'jose'
import {
isDevEnv,
getServerOrigin,
getLicenseToken
getLicenseToken,
isTestEnv
} from '@/modules/shared/helpers/envHelper'
import { LicenseTokenClaims, EnabledModules } from '@/modules/gatekeeper/domain/types'

Expand Down Expand Up @@ -69,7 +70,7 @@ export const validateModuleLicense = async ({
}: {
requiredModules: LicensedModuleNames
}): Promise<boolean> => {
if (isDevEnv()) return true
if (isDevEnv() || isTestEnv()) return true
const licenseToken = getLicenseToken()
if (!licenseToken) return false
const publicKey = await getPublicKey()
Expand Down

0 comments on commit 35d3942

Please sign in to comment.