@@ -520,11 +520,25 @@ export class GitProviderService implements Disposable {
520
520
cacheKey = path ;
521
521
}
522
522
523
- let access = this . _accessCache . get ( cacheKey ) ;
524
- if ( access == null ) {
525
- access = this . accessCore ( feature , repoPath ) ;
526
- this . _accessCache . set ( cacheKey , access ) ;
523
+ let accessPromise = this . _accessCache . get ( cacheKey ) ;
524
+ if ( accessPromise == null ) {
525
+ accessPromise = this . accessCore ( feature , repoPath ) ;
526
+ this . _accessCache . set ( cacheKey , accessPromise ) ;
527
527
}
528
+
529
+ const access = await accessPromise ;
530
+ if (
531
+ feature === PlusFeatures . Graph &&
532
+ access . visibility !== RepositoryVisibility . Private &&
533
+ access . subscription . current . plan . effective . id === SubscriptionPlanId . Free
534
+ ) {
535
+ return {
536
+ allowed : true ,
537
+ subscription : { current : access . subscription . current } ,
538
+ visibility : access . visibility ,
539
+ } ;
540
+ }
541
+
528
542
return access ;
529
543
}
530
544
@@ -554,14 +568,6 @@ export class GitProviderService implements Disposable {
554
568
if ( visibility !== RepositoryVisibility . Private ) {
555
569
switch ( plan ) {
556
570
case SubscriptionPlanId . Free :
557
- if ( feature === PlusFeatures . Graph ) {
558
- return {
559
- allowed : true ,
560
- subscription : { current : subscription } ,
561
- visibility : visibility ,
562
- } ;
563
- }
564
-
565
571
return {
566
572
allowed : false ,
567
573
subscription : { current : subscription , required : SubscriptionPlanId . FreePlus } ,
0 commit comments