diff --git a/.dockerignore b/.dockerignore index 4db9a0bb0..0a0e2e238 100644 --- a/.dockerignore +++ b/.dockerignore @@ -34,4 +34,5 @@ build.ts tsconfig.json Dockerfile* drizzle.config.ts -allowedDevOrigins.json \ No newline at end of file +allowedDevOrigins.json +scratch/ diff --git a/messages/en-US.json b/messages/en-US.json index f033e96f4..5937595b5 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -984,7 +984,7 @@ "sharedPolicy": "Shared Policy", "sharedPolicyNoneDescription": "This resource has its own policy.", "resourceSharedPolicyOwnDescription": "This resource has its own authentication and access rules controls.", - "resourceSharedPolicyInheritedDescription": "This resource inherits authentication and access rules controls from {policyName}.", + "resourceSharedPolicyInheritedDescription": "This resource inherits from {policyName}.", "resourceSharedPolicyAuthenticationNotice": "This resource is using a shared policy. Some authentication settings can be edited on this resource to add to the policy. To change the underlying policy, you must edit to {policyName}.", "resourceSharedPolicyRulesNotice": "This resource is using a shared policy. Some access rules can be edited on this resource. To change the underlying policy, you must edit {policyName}.", "resourceUsersRoles": "Access Controls", diff --git a/server/setup/scriptsSqlite/1.19.0.ts b/server/setup/scriptsSqlite/1.19.0.ts index 809340d94..c69356cae 100644 --- a/server/setup/scriptsSqlite/1.19.0.ts +++ b/server/setup/scriptsSqlite/1.19.0.ts @@ -228,7 +228,7 @@ export default async function migration() { ).run(); db.prepare( ` - UPDATE 'siteResources' SET 'destination2' = 'destination'; + UPDATE 'siteResources' SET "destination2" = "destination"; ` ).run(); db.prepare( @@ -349,9 +349,9 @@ export default async function migration() { db.prepare( ` UPDATE 'targets' - SET 'mode' = ( - SELECT 'mode' FROM 'resources' - WHERE 'resources'.'resourceId' = 'targets'.'resourceId' + SET "mode" = ( + SELECT "mode" FROM 'resources' + WHERE "resources"."resourceId" = "targets"."resourceId" ); ` ).run(); diff --git a/src/app/[orgId]/settings/general/page.tsx b/src/app/[orgId]/settings/general/page.tsx index e20523250..375592fc5 100644 --- a/src/app/[orgId]/settings/general/page.tsx +++ b/src/app/[orgId]/settings/general/page.tsx @@ -43,6 +43,7 @@ import { usePaidStatus } from "@app/hooks/usePaidStatus"; import { tierMatrix, TierFeature } from "@server/lib/billing/tierMatrix"; import { PaidFeaturesAlert } from "@app/components/PaidFeaturesAlert"; import { ExternalLink } from "lucide-react"; +import { env } from "process"; // Schema for general organization settings const GeneralFormSchema = z.object({ @@ -165,6 +166,7 @@ function DeleteForm({ org }: SectionFormProps) { function GeneralSectionForm({ org }: SectionFormProps) { const { updateOrg } = useOrgContext(); + const { env } = useEnvContext(); const form = useForm({ resolver: zodResolver( GeneralFormSchema.pick({ @@ -265,36 +267,42 @@ function GeneralSectionForm({ org }: SectionFormProps) { - ( - - - - - - {t("newtAutoUpdateDescription")}{" "} - - {t("learnMore")} - - - - - - )} - /> + {!env.flags.disableEnterpriseFeatures && ( + ( + + + + + + {t("newtAutoUpdateDescription")}{" "} + + {t("learnMore")} + + + + + + )} + /> + )} diff --git a/src/app/[orgId]/settings/resources/public/[niceId]/general/page.tsx b/src/app/[orgId]/settings/resources/public/[niceId]/general/page.tsx index 70370235b..d3d9b817e 100644 --- a/src/app/[orgId]/settings/resources/public/[niceId]/general/page.tsx +++ b/src/app/[orgId]/settings/resources/public/[niceId]/general/page.tsx @@ -455,7 +455,7 @@ export default function GeneralForm() { )} { !["tcp", "udp"].includes( resource.mode - ) && ( + ) && !env.flags.disableEnterpriseFeatures && ( <> diff --git a/src/app/[orgId]/settings/resources/public/[niceId]/maintenance/page.tsx b/src/app/[orgId]/settings/resources/public/[niceId]/maintenance/page.tsx index bb3dd7186..10bea4ffe 100644 --- a/src/app/[orgId]/settings/resources/public/[niceId]/maintenance/page.tsx +++ b/src/app/[orgId]/settings/resources/public/[niceId]/maintenance/page.tsx @@ -169,20 +169,27 @@ export default function ResourceMaintenancePage() { { id: "automatic", title: `${t("automatic")} (${t("recommended")})`, - description: t("automaticModeDescription"), - disabled: isMaintenanceDisabled + description: t("automaticModeDescription") }, { id: "forced", title: t("forced"), - description: t("forcedModeDescription"), - disabled: isMaintenanceDisabled + description: t("forcedModeDescription") } ]; return ( - - + <> + +
+ + {t("maintenanceMode")} @@ -193,7 +200,6 @@ export default function ResourceMaintenancePage() { -
{ - const isDisabled = !isPaidUser( - tierMatrix.maintencePage - ); - - return ( - - - ( + + + { + maintenanceForm.setValue( + "maintenanceModeEnabled", val - ) => { - if ( - !isDisabled - ) { - maintenanceForm.setValue( - "maintenanceModeEnabled", - val - ); - } - }} - /> - - - - ); - }} + ); + }} + /> + + + + )} /> @@ -329,11 +322,6 @@ export default function ResourceMaintenancePage() { @@ -365,11 +353,6 @@ export default function ResourceMaintenancePage() {