Skip to content

Commit

Permalink
Port API change from main (#9871)
Browse files Browse the repository at this point in the history
* Fix API not being allowed in stable (#9869)

* Fix API not being allowed in stable

* Fix build problems

* Remove unnecessary news item
  • Loading branch information
rchiodo authored May 3, 2022
1 parent 3d2e20a commit bf2516d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/platform/api/apiAccessService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { injectable, inject, named } from 'inversify';
import { ExtensionMode, Memento } from 'vscode';
import { IApplicationEnvironment, IApplicationShell } from '../common/application/types';
import { IApplicationShell } from '../common/application/types';
import { JVSC_EXTENSION_ID, Telemetry } from '../common/constants';
import { GLOBAL_MEMENTO, IExtensionContext, IMemento } from '../common/types';
import { PromiseChain } from '../common/utils/async';
Expand All @@ -30,7 +30,6 @@ export class ApiAccessService {
constructor(
@inject(IMemento) @named(GLOBAL_MEMENTO) private globalState: Memento,
@inject(IApplicationShell) private appShell: IApplicationShell,
@inject(IApplicationEnvironment) private appEnv: IApplicationEnvironment,
@inject(IExtensionContext) private context: IExtensionContext
) {}
public async getAccessInformation(info: {
Expand All @@ -46,11 +45,6 @@ export class ApiAccessService {
}
return { extensionId: info.extensionId, accessAllowed: true };
}
// For now, this API is only available in insiders.
// This way, insider (exploratory API that provides insider/exploratory features are only available in insiders).
if (this.appEnv.channel !== 'insiders') {
return { extensionId: info.extensionId, accessAllowed: false };
}
// Some extensions like our own (stuff we publish for exploration) are always allowed to access the API.
if (TrustedExtensionPublishers.has(publisherId)) {
return { extensionId: info.extensionId, accessAllowed: true };
Expand Down

0 comments on commit bf2516d

Please sign in to comment.