From 3e977ba00df5957d7c6a2fbdd6d54a2e02a5a94f Mon Sep 17 00:00:00 2001
From: miloschwartz
Date: Thu, 11 Jun 2026 12:37:54 -0700
Subject: [PATCH 1/4] make paid alert position more consistent on resource
---
messages/en-US.json | 2 +-
.../public/[niceId]/maintenance/page.tsx | 129 +++++++-----------
2 files changed, 54 insertions(+), 77 deletions(-)
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/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() {
-
-
-
- {t("saveSettings")}
-
-
-
-
+
+
+ {t("saveSettings")}
+
+
+
+
+
+ >
);
}
From b82b41ed26aa100002f21a67f456ab7022b8f3c5 Mon Sep 17 00:00:00 2001
From: miloschwartz
Date: Thu, 11 Jun 2026 15:02:29 -0700
Subject: [PATCH 2/4] fix migration
---
.dockerignore | 3 ++-
server/setup/scriptsSqlite/1.19.0.ts | 8 ++++----
2 files changed, 6 insertions(+), 5 deletions(-)
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/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();
From b0fdc10e060da6d595e75b06f10599793db666f2 Mon Sep 17 00:00:00 2001
From: Owen
Date: Thu, 11 Jun 2026 16:01:32 -0700
Subject: [PATCH 3/4] Properly hide things with disable enterprise flag
---
.../public/[niceId]/general/page.tsx | 2 +-
.../[orgId]/settings/sites/create/page.tsx | 11 +---
src/app/navigation.tsx | 9 ++--
src/components/newt-install-commands.tsx | 50 +++++++++++--------
4 files changed, 35 insertions(+), 37 deletions(-)
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/sites/create/page.tsx b/src/app/[orgId]/settings/sites/create/page.tsx
index 5ea6496fd..e081f2149 100644
--- a/src/app/[orgId]/settings/sites/create/page.tsx
+++ b/src/app/[orgId]/settings/sites/create/page.tsx
@@ -23,7 +23,7 @@ import {
} from "@app/components/ui/form";
import HeaderTitle from "@app/components/SettingsSectionTitle";
import { z } from "zod";
-import { createElement, useEffect, useState } from "react";
+import { useEffect, useState } from "react";
import { useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
import { Input } from "@app/components/ui/input";
@@ -37,15 +37,6 @@ import {
InfoSections,
InfoSectionTitle
} from "@app/components/InfoSection";
-import {
- FaApple,
- FaCubes,
- FaDocker,
- FaFreebsd,
- FaWindows
-} from "react-icons/fa";
-import { SiNixos, SiKubernetes } from "react-icons/si";
-import { Checkbox, CheckboxWithLabel } from "@app/components/ui/checkbox";
import { Alert, AlertDescription, AlertTitle } from "@app/components/ui/alert";
import { generateKeypair } from "../[niceId]/wireguardConfig";
import { createApiClient, formatAxiosError } from "@app/lib/api";
diff --git a/src/app/navigation.tsx b/src/app/navigation.tsx
index 43323ba2f..853a2df98 100644
--- a/src/app/navigation.tsx
+++ b/src/app/navigation.tsx
@@ -156,10 +156,11 @@ export const orgNavSections = (
]
: []),
// PaidFeaturesAlert
- ...((build === "oss" && !env?.flags.disableEnterpriseFeatures) ||
- build === "saas" ||
- env?.app.identityProviderMode === "org" ||
- (env?.app.identityProviderMode === undefined && build !== "oss")
+ ...(!env?.flags.disableEnterpriseFeatures &&
+ (build === "saas" ||
+ env?.app.identityProviderMode === "org" ||
+ (env?.app.identityProviderMode === undefined &&
+ build !== "oss"))
? [
{
title: "sidebarIdentityProviders",
diff --git a/src/components/newt-install-commands.tsx b/src/components/newt-install-commands.tsx
index f2b3d0ca3..23dd072ed 100644
--- a/src/components/newt-install-commands.tsx
+++ b/src/components/newt-install-commands.tsx
@@ -20,6 +20,7 @@ import {
} from "react-icons/fa";
import { ExternalLink } from "lucide-react";
import { SiKubernetes, SiNixos } from "react-icons/si";
+import { useEnvContext } from "@app/hooks/useEnvContext";
export type CommandItem = string | { title: string; command: string };
@@ -50,9 +51,12 @@ export function NewtSiteInstallCommands({
version = "latest"
}: NewtSiteInstallCommandsProps) {
const t = useTranslations();
+ const { env } = useEnvContext();
const [acceptClients, setAcceptClients] = useState(true);
- const [allowPangolinSsh, setAllowPangolinSsh] = useState(true);
+ const [allowPangolinSsh, setAllowPangolinSsh] = useState(
+ !env.flags.disableEnterpriseFeatures
+ );
const [platform, setPlatform] = useState("linux");
const [architecture, setArchitecture] = useState(
() => getArchitectures(platform)[0]
@@ -306,27 +310,29 @@ WantedBy=default.target`
>
{t("siteAcceptClientConnectionsDescription")}
- {supportsSshOption && (
- <>
-
- {
- const value = checked as boolean;
- setAllowPangolinSsh(value);
- }}
- label="Allow Pangolin SSH"
- />
-
-
- {t("sitePangolinSshDescription")}
-
- >
- )}
+ {supportsSshOption &&
+ !env.flags.disableEnterpriseFeatures && (
+ <>
+
+ {
+ const value =
+ checked as boolean;
+ setAllowPangolinSsh(value);
+ }}
+ label="Allow Pangolin SSH"
+ />
+
+
+ {t("sitePangolinSshDescription")}
+
+ >
+ )}
)}
From 820f66e58fba6d72c7ba36cc707cb6674dd8ef14 Mon Sep 17 00:00:00 2001
From: Owen
Date: Thu, 11 Jun 2026 16:01:32 -0700
Subject: [PATCH 4/4] Properly hide things with disable enterprise flag
---
src/app/[orgId]/settings/general/page.tsx | 68 ++++----
.../settings/sites/[niceId]/general/page.tsx | 150 +++++++++---------
src/components/newt-install-commands.tsx | 6 +-
3 files changed, 119 insertions(+), 105 deletions(-)
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/sites/[niceId]/general/page.tsx b/src/app/[orgId]/settings/sites/[niceId]/general/page.tsx
index 8d5a654c9..fdbfc387d 100644
--- a/src/app/[orgId]/settings/sites/[niceId]/general/page.tsx
+++ b/src/app/[orgId]/settings/sites/[niceId]/general/page.tsx
@@ -253,85 +253,87 @@ export default function GeneralPage() {
- {site && site.type === "newt" && (
- {
- const isOverriding = form.watch(
- "autoUpdateOverrideOrg"
- );
- return (
-
-
-
-
{
- field.onChange(
+ {site &&
+ site.type === "newt" &&
+ !env.flags.disableEnterpriseFeatures && (
+ {
+ const isOverriding = form.watch(
+ "autoUpdateOverrideOrg"
+ );
+ return (
+
+
+
+
- {isOverriding && (
- {
+ ) => {
+ field.onChange(
+ checked
+ );
form.setValue(
"autoUpdateOverrideOrg",
- false
- );
- form.setValue(
- "autoUpdateEnabled",
- orgAutoUpdate
+ true
);
}}
- >
- {t(
- "siteAutoUpdateResetToOrg"
- )}
-
- )}
-
-
-
- {t(
- "siteAutoUpdateDescription"
- )}{" "}
-
- {t("learnMore")}
-
-
-
-
-
- );
- }}
- />
- )}
+ disabled={
+ !hasAutoUpdateFeature
+ }
+ />
+ {isOverriding && (
+ {
+ form.setValue(
+ "autoUpdateOverrideOrg",
+ false
+ );
+ form.setValue(
+ "autoUpdateEnabled",
+ orgAutoUpdate
+ );
+ }}
+ >
+ {t(
+ "siteAutoUpdateResetToOrg"
+ )}
+
+ )}
+
+
+
+ {t(
+ "siteAutoUpdateDescription"
+ )}{" "}
+
+ {t("learnMore")}
+
+
+
+
+
+ );
+ }}
+ />
+ )}
diff --git a/src/components/newt-install-commands.tsx b/src/components/newt-install-commands.tsx
index 23dd072ed..badc174cc 100644
--- a/src/components/newt-install-commands.tsx
+++ b/src/components/newt-install-commands.tsx
@@ -75,7 +75,11 @@ export function NewtSiteInstallCommands({
: "";
const disableSshFlag =
- supportsSshOption && !allowPangolinSsh ? " --disable-ssh" : "";
+ supportsSshOption &&
+ !allowPangolinSsh &&
+ !env.flags.disableEnterpriseFeatures
+ ? " --disable-ssh"
+ : "";
const runAsRootPrefix =
supportsSshOption && allowPangolinSsh ? "sudo " : "";