483
}
484
}
486
>
const { target, value } = this._inspectScopedSetting();
487
>
const forAddress: Record<string, AgentHostAccessMode> = { ...(value[address] ?? {}) };
488
>
const uriKey = uri.toString();
489
>
if (forAddress[uriKey] === AgentHostAccessMode.ReadWrite) {
490
return;
491
}
493
>
494
>
await this._configurationService.updateValue(
495
>
AgentHostLocalFilePermissionsSettingId,
496
>
{ ...value, [address]: forAddress },
497
>
target,
498
>
);
499
>
}
500
501
private _inspectScopedSetting(): { target: ConfigurationTarget; value: AgentHostPermissionsSetting } {
502
>
const inspected = this._configurationService.inspect<AgentHostPermissionsSetting>(AgentHostLocalFilePermissionsSettingId);
agentHostResourceService.ts
503
>
if (inspected.applicationValue !== undefined) {
504
return { target: ConfigurationTarget.APPLICATION, value: inspected.applicationValue };
505
}