1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +00:00

[AC-1046] activate autofill on page load policy (#4860)

* [EC-1046] add activate autofill policy to web

* [EC-1046] add local setting if policy needs to be set

* [AC-1046] activate autofill on page load if flag exists

* [AC-1046] move activation to current tab page

* [AC-1046] add warning to autofill policy

* [AC-1046] add useActivateAutofillPolicy to organization reponse

* [AC-1046] autofill to auto-fill
This commit is contained in:
Jake Fink
2023-03-10 12:52:43 -05:00
committed by GitHub
parent e8faf12ac1
commit 7892834f97
17 changed files with 141 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ export class PolicyService implements InternalPolicyServiceAbstraction {
policies$ = this._policies.asObservable();
constructor(
private stateService: StateService,
protected stateService: StateService,
private organizationService: OrganizationService
) {
this.stateService.activeAccountUnlocked$

View File

@@ -2365,6 +2365,26 @@ export class StateService<
);
}
async getActivateAutoFillOnPageLoadFromPolicy(options?: StorageOptions): Promise<boolean> {
return (
await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskLocalOptions()))
)?.settings?.activateAutoFillOnPageLoadFromPolicy;
}
async setActivateAutoFillOnPageLoadFromPolicy(
value: boolean,
options?: StorageOptions
): Promise<void> {
const account = await this.getAccount(
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions())
);
account.settings.activateAutoFillOnPageLoadFromPolicy = value;
return await this.saveAccount(
account,
this.reconcileOptions(options, await this.defaultOnDiskLocalOptions())
);
}
async getSMOnboardingTasks(
options?: StorageOptions
): Promise<Record<string, Record<string, boolean>>> {