@@ -25,7 +25,7 @@ import {
2525 OpenVirtualRepositoryError ,
2626 OpenVirtualRepositoryErrorReason ,
2727} from '../../errors' ;
28- import { Features , PlusFeatures } from '../../features' ;
28+ import { Features } from '../../features' ;
2929import {
3030 GitProvider ,
3131 GitProviderId ,
@@ -38,7 +38,6 @@ import {
3838 RepositoryVisibility ,
3939 ScmRepository ,
4040} from '../../git/gitProvider' ;
41- import { GitProviderService } from '../../git/gitProviderService' ;
4241import { GitUri } from '../../git/gitUri' ;
4342import {
4443 BranchSortOptions ,
@@ -82,12 +81,10 @@ import { RemoteProviderFactory, RemoteProviders } from '../../git/remotes/factor
8281import { RemoteProvider , RichRemoteProvider } from '../../git/remotes/provider' ;
8382import { SearchPattern } from '../../git/search' ;
8483import { LogCorrelationContext , Logger } from '../../logger' ;
85- import { SubscriptionPlanId } from '../../subscription' ;
8684import { gate } from '../../system/decorators/gate' ;
8785import { debug , log } from '../../system/decorators/log' ;
8886import { filterMap , some } from '../../system/iterable' ;
8987import { isAbsolute , isFolderGlob , maybeUri , normalizePath , relative } from '../../system/path' ;
90- import { fastestSettled } from '../../system/promise' ;
9188import { CachedBlame , CachedLog , GitDocumentState } from '../../trackers/gitDocumentTracker' ;
9289import { TrackedDocument } from '../../trackers/trackedDocument' ;
9390import { getRemoteHubApi , GitHubAuthorityMetadata , Metadata , RemoteHubApi } from '../remotehub' ;
@@ -189,36 +186,6 @@ export class GitHubGitProvider implements GitProvider, Disposable {
189186 ) ;
190187 }
191188
192- private _allowedFeatures = new Map < string , Map < PlusFeatures , boolean > > ( ) ;
193- async allows ( feature : PlusFeatures , plan : SubscriptionPlanId , repoPath ?: string ) : Promise < boolean > {
194- if ( plan === SubscriptionPlanId . Free ) return false ;
195- if ( plan === SubscriptionPlanId . Pro ) return true ;
196-
197- if ( repoPath == null ) {
198- const repositories = [ ...this . container . git . getOpenRepositories ( this . descriptor . id ) ] ;
199-
200- for await ( const result of fastestSettled ( repositories . map ( r => this . allows ( feature , plan , r . path ) ) ) ) {
201- if ( result . status !== 'fulfilled' || ! result . value ) return false ;
202- }
203- return true ;
204- }
205-
206- let allowedByRepo = this . _allowedFeatures . get ( repoPath ) ;
207- let allowed = allowedByRepo ?. get ( feature ) ;
208- if ( allowed != null ) return allowed ;
209-
210- allowed = GitProviderService . previewFeatures ?. get ( feature )
211- ? true
212- : ( await this . visibility ( repoPath ) ) === RepositoryVisibility . Public ;
213- if ( allowedByRepo == null ) {
214- allowedByRepo = new Map < PlusFeatures , boolean > ( ) ;
215- this . _allowedFeatures . set ( repoPath , allowedByRepo ) ;
216- }
217-
218- allowedByRepo . set ( feature , allowed ) ;
219- return allowed ;
220- }
221-
222189 // private _supportedFeatures = new Map<Features, boolean>();
223190 async supports ( feature : Features ) : Promise < boolean > {
224191 // const supported = this._supportedFeatures.get(feature);
0 commit comments