Skip to content

Commit ea6b1f8

Browse files
committed
fix(settings): align superUserModeEnabled default to false everywhere
Three places defaulted to true while admin tab and sidebar used false. Align all to false so new admins see consistent behavior.
1 parent 0665b93 commit ea6b1f8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

apps/sim/app/api/users/me/settings/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function GET() {
7272
emailPreferences: userSettings.emailPreferences ?? {},
7373
billingUsageNotificationsEnabled: userSettings.billingUsageNotificationsEnabled ?? true,
7474
showTrainingControls: userSettings.showTrainingControls ?? false,
75-
superUserModeEnabled: userSettings.superUserModeEnabled ?? true,
75+
superUserModeEnabled: userSettings.superUserModeEnabled ?? false,
7676
errorNotificationsEnabled: userSettings.errorNotificationsEnabled ?? true,
7777
snapToGridSize: userSettings.snapToGridSize ?? 0,
7878
showActionBar: userSettings.showActionBar ?? true,

apps/sim/app/workspace/[workspaceId]/templates/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default async function TemplatesPage({ params }: TemplatesPageProps) {
5757
.limit(1)
5858

5959
const isSuperUser = currentUser[0]?.role === 'admin'
60-
const superUserModeEnabled = userSettings[0]?.superUserModeEnabled ?? true
60+
const superUserModeEnabled = userSettings[0]?.superUserModeEnabled ?? false
6161
const effectiveSuperUser = isSuperUser && superUserModeEnabled
6262

6363
// Load templates from database

apps/sim/hooks/queries/general-settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function mapGeneralSettingsResponse(data: Record<string, unknown>): Gener
3636
return {
3737
autoConnect: (data.autoConnect as boolean) ?? true,
3838
showTrainingControls: (data.showTrainingControls as boolean) ?? false,
39-
superUserModeEnabled: (data.superUserModeEnabled as boolean) ?? true,
39+
superUserModeEnabled: (data.superUserModeEnabled as boolean) ?? false,
4040
theme: (data.theme as GeneralSettings['theme']) || 'system',
4141
telemetryEnabled: (data.telemetryEnabled as boolean) ?? true,
4242
billingUsageNotificationsEnabled: (data.billingUsageNotificationsEnabled as boolean) ?? true,

0 commit comments

Comments
 (0)