mirror of
https://github.com/formbricks/formbricks.git
synced 2025-12-30 10:19:51 -06:00
Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com> Co-authored-by: Matthias Nannt <mail@matthiasnannt.com> Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
18 lines
611 B
TypeScript
18 lines
611 B
TypeScript
import { ENTERPRISE_LICENSE_KEY, IS_FORMBRICKS_CLOUD } from "../constants";
|
|
import { getTeam } from "../team/service";
|
|
|
|
export const getIsEnterpriseEdition = (): boolean => {
|
|
if (ENTERPRISE_LICENSE_KEY) {
|
|
return ENTERPRISE_LICENSE_KEY.length > 0;
|
|
}
|
|
return false;
|
|
};
|
|
|
|
export const getMultiLanguagePermission = async (teamId: string): Promise<boolean> => {
|
|
const team = await getTeam(teamId);
|
|
if (!team) return false;
|
|
if (IS_FORMBRICKS_CLOUD) return team.billing.features.inAppSurvey.status !== "inactive";
|
|
else if (!IS_FORMBRICKS_CLOUD) return getIsEnterpriseEdition();
|
|
else return false;
|
|
};
|