[Remote-SSH Bug]: Settings missing in remote settings view (fix microsoft/vscode-remote-release#8627) (#186828)

This commit is contained in:
Benjamin Pasero
2023-07-03 11:08:06 +02:00
committed by GitHub
parent 6b83d6d01b
commit b0e5025ef5
2 changed files with 50 additions and 28 deletions

View File

@@ -7,7 +7,7 @@ import { Registry } from 'vs/platform/registry/common/platform';
import { localize } from 'vs/nls';
import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
import { isMacintosh, isWindows, isLinux, isWeb, isNative } from 'vs/base/common/platform';
import { ConfigurationMigrationWorkbenchContribution, securityConfigurationNodeBase, workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration';
import { ConfigurationMigrationWorkbenchContribution, DynamicWorkbenchConfigurationWorkbenchContribution, workbenchConfigurationNodeBase } from 'vs/workbench/common/configuration';
import { isStandalone } from 'vs/base/browser/browser';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
@@ -20,6 +20,9 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
// Migration support
Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).registerWorkbenchContribution(ConfigurationMigrationWorkbenchContribution, LifecyclePhase.Eventually);
// Dynamic Configuration
Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench).registerWorkbenchContribution(DynamicWorkbenchConfigurationWorkbenchContribution, LifecyclePhase.Ready);
// Workbench
registry.registerConfiguration({
...workbenchConfigurationNodeBase,
@@ -709,30 +712,4 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
}
}
});
// Security
registry.registerConfiguration({
...securityConfigurationNodeBase,
'properties': {
'security.allowedUNCHosts': {
'type': 'array',
'items': {
'type': 'string',
'pattern': '^[^\\\\]+$',
'patternErrorMessage': localize('security.allowedUNCHosts.patternErrorMessage', 'UNC host names must not contain backslashes.')
},
'default': [],
'markdownDescription': localize('security.allowedUNCHosts', 'A set of UNC host names (without leading or trailing backslash, for example `192.168.0.1` or `my-server`) to allow without user confirmation. If a UNC host is being accessed that is not allowed via this setting or has not been acknowledged via user confirmation, an error will occur and the operation stopped. A restart is required when changing this setting. Find out more about this setting at https://aka.ms/vscode-windows-unc.'),
'included': isWeb ? true /* web maybe connected to a windows machine */ : isWindows,
'scope': ConfigurationScope.MACHINE
},
'security.restrictUNCAccess': {
'type': 'boolean',
'default': true,
'markdownDescription': localize('security.restrictUNCAccess', 'If enabled, only allows access to UNC host names that are allowed by the `#security.allowedUNCHosts#` setting or after user confirmation. Find out more about this setting at https://aka.ms/vscode-windows-unc.'),
'included': isWeb ? true /* web maybe connected to a windows machine */ : isWindows,
'scope': ConfigurationScope.MACHINE
}
}
});
})();