You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
markdownDescription: localize('extensions.blockNonGalleryExtensions',"When enabled and the allowed extensions policy is configured, blocks installation of non-gallery extensions (VSIX files and resource extensions). Only extensions from the gallery can be installed."),
789
+
default: false,
790
+
scope: ConfigurationScope.APPLICATION,
791
+
policy: {
792
+
name: 'BlockNonGalleryExtensions',
793
+
minimumVersion: '1.96',
794
+
description: localize('extensions.blockNonGalleryExtensions.policy',"When enabled and the allowed extensions policy is configured, blocks installation of non-gallery extensions (VSIX files and resource extensions). Only extensions from the gallery can be installed."),
@@ -567,7 +568,32 @@ export class BrowserMain extends Disposable {
567
568
}
568
569
569
570
constconfigurationCache=newConfigurationCache([Schemas.file,Schemas.vscodeUserData,Schemas.tmp]/* Cache all non native resources */,environmentService,fileService);
returnlocalResult??remoteResult??webResult??newMarkdownString().appendText(nls.localize('cannot be installed',"Cannot install the '{0}' extension because it is not available in this setup.",extension.displayName??extension.identifier.id));
2429
2436
}
2430
2437
2438
+
// Block non-gallery extensions if the policy is configured and blockNonGalleryExtensions is enabled
returnnewMarkdownString(nls.localize('non-gallery extension not allowed',"This extension cannot be installed because only extensions from the gallery are allowed. Please install this extension from the Extensions marketplace."));
thrownewError(nls.localize('vsix not allowed',"VSIX files cannot be installed because only extensions from the gallery are allowed. Please install this extension from the Extensions marketplace."));
thrownewError(nls.localize('resource extension not allowed',"Resource extensions cannot be installed because only extensions from the gallery are allowed. Please install this extension from the Extensions marketplace."));
0 commit comments