Files
spacesopsandCursor 073344d4d1
Build Service / BuildPackage (push) Canceled after 0s
0.3.0:1
Group Actions and Config by category (Space-CLI, Bitcoin, Spaced,
Subspaces, Certrelay, Nacho) and build x86 + arm only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 03:34:34 -04:00

39 lines
1.2 KiB
TypeScript

import { storeJson } from '../fileModels/storeJson'
import { actionGroups } from '../actionGroups'
import { i18n } from '../i18n'
import { sdk } from '../sdk'
export const disableSubsAuth = sdk.Action.withoutInput(
// id
'disable-subs-auth',
// metadata
async ({ effects }) => {
const enabled = await storeJson.read((s) => s.subsAuthEnabled).once()
return {
name: i18n('Disable Subspaces Auth'),
description: i18n(
'Turn off HTTP basic auth in front of the Subspaces Web UI / Subs API. Stored credentials are preserved so re-enabling does not generate new ones; use "Set Subspaces Auth Credentials" to rotate. Service restarts.',
),
warning: null,
allowedStatuses: 'any',
group: actionGroups.subspacesAuth,
visibility: enabled === true ? 'enabled' : 'hidden',
}
},
// run
async ({ effects }) => {
await storeJson.merge(effects, { subsAuthEnabled: false })
return {
version: '1',
title: i18n('Success'),
message: i18n(
'Subspaces Auth disabled. The service is restarting; subs will serve unauthenticated again on port 7777. Stored credentials are kept for the next enable.',
),
result: null,
}
},
)