[PM-3730] Master Password Re-prompt Enabled Items Invoke Popup Window Automatically When Autofill on Page Load is Enabled (#6189)
* [PM-3730] MPR-enabled items invoke the pop-out window automatically when autofill on-page-load is enabled * [PM-3730] Updating vault item views to ensure that autofill on page load setting is not confusing to users * [PM-3730] Setting up toast message to appear when user opts to turn on master password reprompt * [PM-3730] Ensuring that toast messages do not show when the autofill on page load value is not on * [PM-3730] Updating copy and adding help text below the autofill on page load field within vault items in the extension
This commit is contained in:
parent
a9c25e8310
commit
c75f6c28eb
|
@ -2406,5 +2406,17 @@
|
||||||
"toggleCollapse": {
|
"toggleCollapse": {
|
||||||
"message": "Toggle collapse",
|
"message": "Toggle collapse",
|
||||||
"description": "Toggling an expand/collapse state."
|
"description": "Toggling an expand/collapse state."
|
||||||
|
},
|
||||||
|
"passwordRepromptDisabledAutofillOnPageLoad": {
|
||||||
|
"message": "Items with master password re-prompt cannot be auto-filled on page load. Auto-fill on page load turned off.",
|
||||||
|
"description": "Toast message for describing that master password re-prompt cannot be auto-filled on page load."
|
||||||
|
},
|
||||||
|
"autofillOnPageLoadSetToDefault": {
|
||||||
|
"message": "Auto-fill on page load set to use default setting.",
|
||||||
|
"description": "Toast message for informing the user that auto-fill on page load has been set to the default setting."
|
||||||
|
},
|
||||||
|
"turnOffMasterPasswordPromptToEditField": {
|
||||||
|
"message": "Turn off master password re-prompt to edit this field",
|
||||||
|
"description": "Message appearing below the autofill on load message when master password reprompt is set for a vault item."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,9 @@ import AutofillScript from "../models/autofill-script";
|
||||||
import {
|
import {
|
||||||
AutoFillOptions,
|
AutoFillOptions,
|
||||||
AutofillService as AutofillServiceInterface,
|
AutofillService as AutofillServiceInterface,
|
||||||
PageDetail,
|
|
||||||
FormData,
|
FormData,
|
||||||
GenerateFillScriptOptions,
|
GenerateFillScriptOptions,
|
||||||
|
PageDetail,
|
||||||
} from "./abstractions/autofill.service";
|
} from "./abstractions/autofill.service";
|
||||||
import {
|
import {
|
||||||
AutoFillConstants,
|
AutoFillConstants,
|
||||||
|
@ -260,7 +260,7 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cipher == null) {
|
if (cipher == null || (cipher.reprompt === CipherRepromptType.Password && !fromCommand)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -564,6 +564,7 @@
|
||||||
<select
|
<select
|
||||||
id="autofillOnPageLoad"
|
id="autofillOnPageLoad"
|
||||||
name="AutofillOnPageLoad"
|
name="AutofillOnPageLoad"
|
||||||
|
[disabled]="reprompt"
|
||||||
[(ngModel)]="cipher.login.autofillOnPageLoad"
|
[(ngModel)]="cipher.login.autofillOnPageLoad"
|
||||||
>
|
>
|
||||||
<option *ngFor="let o of autofillOnPageLoadOptions" [ngValue]="o.value">
|
<option *ngFor="let o of autofillOnPageLoadOptions" [ngValue]="o.value">
|
||||||
|
@ -572,6 +573,9 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="box-footer !tw-mb-0 !tw-pb-0" *ngIf="reprompt">
|
||||||
|
{{ "turnOffMasterPasswordPromptToEditField" | i18n }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="box-content">
|
<div class="box-content">
|
||||||
|
|
|
@ -264,4 +264,27 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||||
}
|
}
|
||||||
}, 200);
|
}, 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repromptChanged() {
|
||||||
|
super.repromptChanged();
|
||||||
|
|
||||||
|
if (!this.showAutoFillOnPageLoadOptions) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.reprompt) {
|
||||||
|
this.platformUtilsService.showToast(
|
||||||
|
"info",
|
||||||
|
null,
|
||||||
|
this.i18nService.t("passwordRepromptDisabledAutofillOnPageLoad")
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.platformUtilsService.showToast(
|
||||||
|
"info",
|
||||||
|
null,
|
||||||
|
this.i18nService.t("autofillOnPageLoadSetToDefault")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -272,6 +272,9 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
this.previousCipherId = this.cipherId;
|
this.previousCipherId = this.cipherId;
|
||||||
this.reprompt = this.cipher.reprompt !== CipherRepromptType.None;
|
this.reprompt = this.cipher.reprompt !== CipherRepromptType.None;
|
||||||
|
if (this.reprompt) {
|
||||||
|
this.cipher.login.autofillOnPageLoad = this.autofillOnPageLoadOptions[2].value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async submit(): Promise<boolean> {
|
async submit(): Promise<boolean> {
|
||||||
|
@ -570,8 +573,10 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||||
this.reprompt = !this.reprompt;
|
this.reprompt = !this.reprompt;
|
||||||
if (this.reprompt) {
|
if (this.reprompt) {
|
||||||
this.cipher.reprompt = CipherRepromptType.Password;
|
this.cipher.reprompt = CipherRepromptType.Password;
|
||||||
|
this.cipher.login.autofillOnPageLoad = this.autofillOnPageLoadOptions[2].value;
|
||||||
} else {
|
} else {
|
||||||
this.cipher.reprompt = CipherRepromptType.None;
|
this.cipher.reprompt = CipherRepromptType.None;
|
||||||
|
this.cipher.login.autofillOnPageLoad = this.autofillOnPageLoadOptions[0].value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue