1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[PM-21480] - check for privacy granted in isBrowserAutofillSettingOverridden (#14748)

* check for privacy granted in isBrowserAutofillSettingOverridden

* check for privacy granted in browserAutofillSettingsOverridden
This commit is contained in:
Jordan Aasen
2025-05-12 12:17:15 -07:00
committed by GitHub
parent 90d8e822ff
commit ce8e123c44

View File

@@ -664,6 +664,10 @@ export class BrowserApi {
* Identifies if the browser autofill settings are overridden by the extension.
*/
static async browserAutofillSettingsOverridden(): Promise<boolean> {
if (!(await BrowserApi.permissionsGranted(["privacy"]))) {
return false;
}
const checkOverrideStatus = (details: chrome.types.ChromeSettingGetResult<boolean>) =>
details.levelOfControl === "controlled_by_this_extension" && !details.value;