feat(FN-2585): remove top-level remote access toggle
- Remove the standalone remoteEnabled setting from CLI, core settings defaults/types, and dashboard settings APIs/UI - Treat remote access as enabled when an active provider is selected and that provider is configured as enabled - Update remote auth and engine lifecycle checks to gate on provider activation instead of a global flag - Adjust tests and add a changeset documenting the remote access configuration simplification
This commit is contained in:
@@ -110,12 +110,16 @@ function isRemoteAccessTokenStrategyEnabled(settings: RemoteAccessSettings): boo
|
||||
return settings.tokenStrategy.persistent.enabled || settings.tokenStrategy.shortLived.enabled;
|
||||
}
|
||||
|
||||
function isRemoteProviderEnabled(settings: RemoteAccessSettings): boolean {
|
||||
return Boolean(settings.activeProvider != null && settings.providers[settings.activeProvider]?.enabled);
|
||||
}
|
||||
|
||||
export function validateRemoteAuthToken(
|
||||
rt: string | null | undefined,
|
||||
settings: RemoteAccessSettings,
|
||||
nowMs: number = Date.now(),
|
||||
): RemoteTokenValidationResult {
|
||||
if (!settings.enabled || !isRemoteAccessTokenStrategyEnabled(settings)) {
|
||||
if (!isRemoteProviderEnabled(settings) || !isRemoteAccessTokenStrategyEnabled(settings)) {
|
||||
return { status: "disabled" };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user