mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +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:
@@ -2,6 +2,7 @@ import { Component } from "@angular/core";
|
||||
|
||||
import { AppComponent as BaseAppComponent } from "@bitwarden/web-vault/app/app.component";
|
||||
|
||||
import { ActivateAutofillPolicy } from "./policies/activate-autofill.component";
|
||||
import { DisablePersonalVaultExportPolicy } from "./policies/disable-personal-vault-export.component";
|
||||
import { MaximumVaultTimeoutPolicy } from "./policies/maximum-vault-timeout.component";
|
||||
|
||||
@@ -16,6 +17,7 @@ export class AppComponent extends BaseAppComponent {
|
||||
this.policyListService.addPolicies([
|
||||
new MaximumVaultTimeoutPolicy(),
|
||||
new DisablePersonalVaultExportPolicy(),
|
||||
new ActivateAutofillPolicy(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import { WildcardRoutingModule } from "@bitwarden/web-vault/app/wildcard-routing
|
||||
import { AppRoutingModule } from "./app-routing.module";
|
||||
import { AppComponent } from "./app.component";
|
||||
import { OrganizationsModule } from "./organizations/organizations.module";
|
||||
import { ActivateAutofillPolicyComponent } from "./policies/activate-autofill.component";
|
||||
import { DisablePersonalVaultExportPolicyComponent } from "./policies/disable-personal-vault-export.component";
|
||||
import { MaximumVaultTimeoutPolicyComponent } from "./policies/maximum-vault-timeout.component";
|
||||
|
||||
@@ -39,6 +40,7 @@ import { MaximumVaultTimeoutPolicyComponent } from "./policies/maximum-vault-tim
|
||||
AppComponent,
|
||||
DisablePersonalVaultExportPolicyComponent,
|
||||
MaximumVaultTimeoutPolicyComponent,
|
||||
ActivateAutofillPolicyComponent,
|
||||
],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<app-callout type="warning">
|
||||
{{ "experimentalFeature" | i18n }}
|
||||
<a href="https://bitwarden.com/help/auto-fill-browser/" target="_blank" rel="noopener">{{
|
||||
"learnMoreAboutAutofill" | i18n
|
||||
}}</a>
|
||||
</app-callout>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="checkbox"
|
||||
id="enabled"
|
||||
[formControl]="enabled"
|
||||
name="Enabled"
|
||||
/>
|
||||
<label class="form-check-label" for="enabled">{{ "turnOn" | i18n }}</label>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
import { PolicyType } from "@bitwarden/common/enums/policyType";
|
||||
import { Organization } from "@bitwarden/common/models/domain/organization";
|
||||
import {
|
||||
BasePolicy,
|
||||
BasePolicyComponent,
|
||||
} from "@bitwarden/web-vault/app/organizations/policies/base-policy.component";
|
||||
|
||||
export class ActivateAutofillPolicy extends BasePolicy {
|
||||
name = "activateAutofill";
|
||||
description = "activateAutofillDesc";
|
||||
type = PolicyType.ActivateAutofill;
|
||||
component = ActivateAutofillPolicyComponent;
|
||||
|
||||
display(organization: Organization) {
|
||||
return organization.useActivateAutofillPolicy;
|
||||
}
|
||||
}
|
||||
|
||||
@Component({
|
||||
selector: "policy-activate-autofill",
|
||||
templateUrl: "activate-autofill.component.html",
|
||||
})
|
||||
export class ActivateAutofillPolicyComponent extends BasePolicyComponent {}
|
||||
Reference in New Issue
Block a user