Build Service / BuildPackage (push) Canceled after 0s
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>
39 lines
1.2 KiB
TypeScript
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 disableSubsProverAuth = sdk.Action.withoutInput(
|
|
// id
|
|
'disable-subs-prover-auth',
|
|
|
|
// metadata
|
|
async ({ effects }) => {
|
|
const enabled = await storeJson.read((s) => s.subsProverAuthEnabled).once()
|
|
return {
|
|
name: i18n('Disable Subspaces Prover Auth'),
|
|
description: i18n(
|
|
'Turn off HTTP basic auth in front of the Subspaces Prover. Stored credentials are preserved so re-enabling does not generate new ones; use "Set Subspaces Prover Auth Credentials" to rotate. Service restarts.',
|
|
),
|
|
warning: null,
|
|
allowedStatuses: 'any',
|
|
group: actionGroups.subspacesProverAuth,
|
|
visibility: enabled === true ? 'enabled' : 'hidden',
|
|
}
|
|
},
|
|
|
|
// run
|
|
async ({ effects }) => {
|
|
await storeJson.merge(effects, { subsProverAuthEnabled: false })
|
|
|
|
return {
|
|
version: '1',
|
|
title: i18n('Success'),
|
|
message: i18n(
|
|
'Subspaces Prover Auth disabled. The service is restarting; subs-prover will serve unauthenticated again on port 8888. Stored credentials are kept for the next enable.',
|
|
),
|
|
result: null,
|
|
}
|
|
},
|
|
)
|