()
| 42 | } |
| 43 | |
| 44 | export const isAnonymousAccessEnabled = async () => { |
| 45 | if (!await isAnonymousAccessAvailable()) { |
| 46 | return false; |
| 47 | } |
| 48 | |
| 49 | if (env.FORCE_ENABLE_ANONYMOUS_ACCESS !== undefined) { |
| 50 | return env.FORCE_ENABLE_ANONYMOUS_ACCESS === 'true'; |
| 51 | } |
| 52 | |
| 53 | const org = await __unsafePrisma.org.findUnique({ |
| 54 | where: { id: SINGLE_TENANT_ORG_ID }, |
| 55 | }); |
| 56 | |
| 57 | if (!org) { |
| 58 | return false; |
| 59 | } |
| 60 | |
| 61 | return org.isAnonymousAccessEnabled; |
| 62 | } |
| 63 | |
| 64 | export const isValidLicenseActive = async () => { |
| 65 | const license = await getSingleTenantLicense(); |
no test coverage detected