@@ -47,7 +47,7 @@ const FIRST_PARTY_ALLOWED_EXTENSIONS = [
47
47
48
48
export function readAccountUsages ( storageService : IStorageService , providerId : string , accountName : string , ) : IAccountUsage [ ] {
49
49
const accountKey = `${ providerId } -${ accountName } -usages` ;
50
- const storedUsages = storageService . get ( accountKey , StorageScope . PROFILE ) ;
50
+ const storedUsages = storageService . get ( accountKey , StorageScope . APPLICATION ) ;
51
51
let usages : IAccountUsage [ ] = [ ] ;
52
52
if ( storedUsages ) {
53
53
try {
@@ -62,7 +62,7 @@ export function readAccountUsages(storageService: IStorageService, providerId: s
62
62
63
63
export function removeAccountUsage ( storageService : IStorageService , providerId : string , accountName : string ) : void {
64
64
const accountKey = `${ providerId } -${ accountName } -usages` ;
65
- storageService . remove ( accountKey , StorageScope . PROFILE ) ;
65
+ storageService . remove ( accountKey , StorageScope . APPLICATION ) ;
66
66
}
67
67
68
68
export function addAccountUsage ( storageService : IStorageService , providerId : string , accountName : string , extensionId : string , extensionName : string ) {
@@ -84,7 +84,7 @@ export function addAccountUsage(storageService: IStorageService, providerId: str
84
84
} ) ;
85
85
}
86
86
87
- storageService . store ( accountKey , JSON . stringify ( usages ) , StorageScope . PROFILE , StorageTarget . MACHINE ) ;
87
+ storageService . store ( accountKey , JSON . stringify ( usages ) , StorageScope . APPLICATION , StorageTarget . MACHINE ) ;
88
88
}
89
89
90
90
export type AuthenticationSessionInfo = { readonly id : string ; readonly accessToken : string ; readonly providerId : string ; readonly canSignOut ?: boolean } ;
@@ -112,7 +112,7 @@ export interface AllowedExtension {
112
112
export function readAllowedExtensions ( storageService : IStorageService , providerId : string , accountName : string ) : AllowedExtension [ ] {
113
113
let trustedExtensions : AllowedExtension [ ] = [ ] ;
114
114
try {
115
- const trustedExtensionSrc = storageService . get ( `${ providerId } -${ accountName } ` , StorageScope . PROFILE ) ;
115
+ const trustedExtensionSrc = storageService . get ( `${ providerId } -${ accountName } ` , StorageScope . APPLICATION ) ;
116
116
if ( trustedExtensionSrc ) {
117
117
trustedExtensions = JSON . parse ( trustedExtensionSrc ) ;
118
118
}
@@ -410,7 +410,7 @@ export class AuthenticationService extends Disposable implements IAuthentication
410
410
allowList [ index ] . allowed = isAllowed ;
411
411
}
412
412
413
- await this . storageService . store ( `${ providerId } -${ accountName } ` , JSON . stringify ( allowList ) , StorageScope . PROFILE , StorageTarget . USER ) ;
413
+ await this . storageService . store ( `${ providerId } -${ accountName } ` , JSON . stringify ( allowList ) , StorageScope . APPLICATION , StorageTarget . USER ) ;
414
414
}
415
415
416
416
async showGetSessionPrompt ( providerId : string , accountName : string , extensionId : string , extensionName : string ) : Promise < boolean > {
@@ -475,7 +475,7 @@ export class AuthenticationService extends Disposable implements IAuthentication
475
475
this . updatedAllowedExtension ( providerId , accountName , extensionId , extensionName , true ) ;
476
476
477
477
this . removeAccessRequest ( providerId , extensionId ) ;
478
- this . storageService . store ( `${ extensionName } -${ providerId } ` , session . id , StorageScope . PROFILE , StorageTarget . MACHINE ) ;
478
+ this . storageService . store ( `${ extensionName } -${ providerId } ` , session . id , StorageScope . APPLICATION , StorageTarget . MACHINE ) ;
479
479
480
480
quickPick . dispose ( ) ;
481
481
resolve ( session ) ;
@@ -615,7 +615,7 @@ export class AuthenticationService extends Disposable implements IAuthentication
615
615
this . updatedAllowedExtension ( providerId , session . account . label , extensionId , extensionName , true ) ;
616
616
617
617
// And also set it as the preferred account for the extension
618
- storageService . store ( `${ extensionName } -${ providerId } ` , session . id , StorageScope . PROFILE , StorageTarget . MACHINE ) ;
618
+ storageService . store ( `${ extensionName } -${ providerId } ` , session . id , StorageScope . APPLICATION , StorageTarget . MACHINE ) ;
619
619
}
620
620
} ) ;
621
621
0 commit comments