Open Bug 2079511 Opened 8 days ago Updated 8 days ago

Only show the security code checkbox in the card doorhanger for the first n prompts

Categories

(Toolkit :: Form Autofill, task)

task

Tracking

()

People

(Reporter: mtigley, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Whiteboard: [fxcm-cvv])

Follow-up to the security code checkbox bug. The checked state still follows extensions.formautofill.creditCards.cvv.enabled. Users who turned the setting off see it unchecked during those prompts.

Implementation:

  • Add a counter pref (e.g. extensions.formautofill.creditCards.cvv.checkboxPromptCount, default 0) next to the other extensions.formautofill.creditCards.cvv.* prefs in modules/libpref/init/all.js.
  • Increment it in the doorhanger's "shown" event (onEventCallback in FormAutofillPrompter.sys.mjs) when the checkbox is rendered. Save and update prompts share it, and it never resets.
  • Add count < n to the checkbox gate (FormAutofill.isAutofillCreditCardCVVSupported), with N in one constant.

Tests: shown on prompts 1-n and hidden on the n+1; the counter is shared between save and update prompts.

Design to confirm that the counter never resets.

You need to log in before you can comment on or make changes to this bug.