mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-04 10:30:00 -06:00
mock getIsSpamProtectionEnabled function
This commit is contained in:
@@ -394,18 +394,8 @@ export const getIsSamlSsoEnabled = async (): Promise<boolean> => {
|
||||
export const getIsSpamProtectionEnabled = async (
|
||||
billingPlan: Organization["billing"]["plan"]
|
||||
): Promise<boolean> => {
|
||||
if (!IS_RECAPTCHA_CONFIGURED) return false;
|
||||
|
||||
if (E2E_TESTING) {
|
||||
const previousResult = await fetchLicenseForE2ETesting();
|
||||
return previousResult?.features ? previousResult.features.spamProtection : false;
|
||||
}
|
||||
if (IS_FORMBRICKS_CLOUD)
|
||||
return billingPlan === PROJECT_FEATURE_KEYS.SCALE || billingPlan === PROJECT_FEATURE_KEYS.ENTERPRISE;
|
||||
|
||||
const licenseFeatures = await getLicenseFeatures();
|
||||
if (!licenseFeatures) return false;
|
||||
return licenseFeatures.spamProtection;
|
||||
logger.debug(billingPlan);
|
||||
return false;
|
||||
};
|
||||
|
||||
export const getOrganizationProjectsLimit = async (
|
||||
|
||||
Reference in New Issue
Block a user