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 |
|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
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 phrasestext stays grey. - Add
2to the password. Make sure thecommon phrasestext is green. - Remove
2. Make sure thecommon phrasestext becomes grey. - Clear the password field. Click
Register. - Make sure the
common phrasestext becomes red. - Enter
111111112. Make sure thecommon phrasestext is green. - Submit the form. Make sure user is created.
- Finish registration and sign out.
- Visit
/-/trial_registrations/new. - Make sure there is
common phrasestext. - 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 phrasestext.
Related to #461828 (closed)
Edited by Serhii Yarynovskyi





