Skip to content

Add foundation for JH phone verification codes except db

Tommy requested to merge (removed):jh-mr-67-phone-verify into master

What does this MR do?

JH SaaS (https://gitlab.cn) need Verify user phone in the registration and terms acceptation.

This MR is split from JH MR - gitlab-jh/gitlab!67 (closed) except the db, since the plan of db migrations is not finalized. So if the db codes will be created in another MR.

From my view, we can review these codes first to reduce the follow-up reviewing workload and these codes will not affect the upstream

Screenshots or Screencasts (strongly suggested)

Screenshot 1

image

Screenshot 2

image

Changed files

  • app/controllers/users/terms_controller.rb We JH need to override accept action to add phone verification
  • app/helpers/recaptcha_helper.rb We JH need to skip to using the phone verification instead of the default form recaptcha
  • app/views/devise/shared/_signup_box.html.haml add to the page like you see above Screenshot 1
  • app/views/users/terms/index.html.haml add to the page like you see above Screenshot 2
  • config/routes/user.rb add to check the phone available which is like username check
  • config/routes.rb add to send short message
  • spec/helpers/recaptcha_helper_spec.rb fix the spec test to be compatible with both upstream and jh
  • tooling/danger/project_helper.rb fix to be compatible with both upstream and jh

@godfat-gitlab Could you please help review or ask someone to review this, Thanks.

CC: @qianzhangxa @qk44077907

Edited by Lin Jen-Shin

Merge request reports