Fix the password_required_bug

Related to #583996

What does this MR do and why?

What?

Makes the #current_password_required view helper work correctly to show the password validation when adding a passkey.

Why?

The uses the #current_password_required in the AuthHelper vs its own helper_method or instance variable in ::PasskeyController#new.

This leads to inconsistent #current_password_required states when its called in app/views/profiles/passkeys/new.html.haml

How to set up and validate locally

  • Run rails console gdk rails console in a terminal
  • Turn off & on password_authentication_enabled_for_web & confirm
  • Enable passkeys FF: Feature.enable(:passkeys)
  • Disable password_authentication_enabled_for_web
curl -X PUT https://gdk.test:3443/api/v4/application/settings?password_authentication_enabled_for_web=false
curl -X PUT https://gdk.test:3443/api/v4/application/settings?password_authentication_enabled_for_web=true
  • Verify that the password input always show in ::PasskeysController#new page

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading