Skip to content

Commit 1aa4dfb

Browse files
test
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent 88e21ab commit 1aa4dfb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

code/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2407,6 +2407,7 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
24072407
}
24082408

24092409
if (extension.gallery) {
2410+
console.log('+++++++ extension.gallery ');
24102411
// Check if extension is allowed first (before checking platform compatibility or signing)
24112412
const allowedResult = this.allowedExtensionsService.isAllowed({ id: extension.gallery.identifier.id, publisherDisplayName: extension.gallery.publisherDisplayName });
24122413
if (allowedResult !== true) {
@@ -2433,13 +2434,19 @@ export class ExtensionsWorkbenchService extends Disposable implements IExtension
24332434
}
24342435

24352436
return localResult ?? remoteResult ?? webResult ?? new MarkdownString().appendText(nls.localize('cannot be installed', "Cannot install the '{0}' extension because it is not available in this setup.", extension.displayName ?? extension.identifier.id));
2437+
} else {
2438+
console.log('+++++++ NOT extension.gallery ');
24362439
}
24372440

24382441
// Block non-gallery extensions if the policy is configured and blockNonGalleryExtensions is enabled
24392442
const blockNonGallery = this.configurationService.getValue<boolean>(BlockNonGalleryExtensionsConfigKey);
2443+
console.log('+++++++ blockNonGallery ', blockNonGallery);
24402444
const hasPolicy = this.configurationService.inspect(AllowedExtensionsConfigKey).policy !== undefined;
24412445
if (hasPolicy && blockNonGallery) {
2446+
console.log('+++++++ hasPolicy && blockNonGallery ', hasPolicy);
24422447
return new MarkdownString(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."));
2448+
} else {
2449+
console.log('+++++++ NOT hasPolicy && blockNonGallery ', hasPolicy);
24432450
}
24442451

24452452
if (extension.resourceExtension && await this.extensionManagementService.canInstall(extension.resourceExtension) === true) {

0 commit comments

Comments
 (0)