Skip to content

Frontend (user-facing) to allow remember me to be disabled

What does this MR do and why?

Describe in detail what your merge request does and why.

When Remember Me is disabled via application settings, do not show the checkbox in the various sign-in UI locations. This is the frontend for https://gitlab.com/gitlab-org/gitlab/-/issues/369133.

  • Follow-up to !119226 (merged).
  • Backend and UI to modify the application setting will be in separate MRs.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After (*When remember me is disabled)
Screenshot_2023-05-02_at_10.24.48_AM Screenshot_2023-05-02_at_10.25.41_AM
Screenshot_2023-05-02_at_10.24.38_AM Screenshot_2023-05-02_at_10.25.50_AM
Screenshot_2023-05-02_at_10.24.43_AM Screenshot_2023-05-02_at_10.25.45_AM

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Disable application setting via Rails console
    settings = ApplicationSetting.last
    settings.remember_me_enabled = false
    settings.save
  2. Visit sign-in page. Depending on which authentication methods you have configured you can look at different tabs. None should contain 'Remember me' checkbox. Similarly, the OmniAuth sign-in section below the sign-in boxes/tabs should not have a 'Remember me' tab, either.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Drew Blessing

Merge request reports