Skip to content

Add common phrases copy to sign up page

What does this MR do and why?

We should tell the user about any password conditions at the start, which will ultimately help the user to create a more secure account. Added JS validation for common phrases to the password field.

MR acceptance checklist

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

Screenshots or screen recordings

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

Before After
Screenshot_2024-07-26_at_17.59.00 Screenshot_2024-07-30_at_18.40.18
Screenshot_2024-07-26_at_17.59.48 Screenshot_2024-07-26_at_14.24.59
Screenshot_2024-07-26_at_17.59.53 Screenshot_2024-07-26_at_14.25.05

Screen_Recording_2024-07-26_at_17.02.55

How to set up and validate locally

bin/rails c

Feature.enable(:display_password_requirements)
  • Setup gdk to simulate SaaS - https://docs.gitlab.com/ee/development/ee_features.html#simulate-a-saas-instance and restart GDK.
  • Make sure you have License locally (can be faked here by returning true).
  • Sign out. Visit /users/sign_up.
  • Fill the form with valid data.
  • Fill the password with 11111111.
  • Make sure the common phrases text stays grey.
  • Add 2 to the password. Make sure the common phrases text is green.
  • Remove 2. Make sure the common phrases text becomes grey.
  • Clear the password field. Click Register.
  • Make sure the common phrases text becomes red.
  • Enter 111111112. Make sure the common phrases text is green.
  • Submit the form. Make sure user is created.
  • Finish registration and sign out.
  • Visit /-/trial_registrations/new.
  • Make sure there is common phrases text.
  • Click sign in link. Sign in as root.
  • Go to Admin area -> Users. Edit any user.
  • Change password field and make sure there is no common phrases text.

Related to #461828 (closed)

Edited by Serhii Yarynovskyi

Merge request reports

Loading