Skip to content

Enforce acceptance of changed terms

What does this MR do and why?

Related to issue #345524 (closed)

Related to JH issue https://jihulab.com/gitlab-cn/gitlab/-/issues/3697

What's been done

  1. User must accept the latest version of terms, or they will be redirected to the terms page
  2. The redirection of terms is placed before the onboarding process
  3. It's GitLab Free
  4. Feature flag enforce_acceptance_of_changed_terms was introduced.

Why do we change the EE

For the skip_before_action :onboarding_redirect, there will be a redirect death loop for the users who are onboarding and during that time the terms are changed.

Screenshots or screen recordings

terms

How to set up and validate locally

  1. In rails console enable the experiment fully
    Feature.enable(:enforce_acceptance_of_changed_terms)
  2. Login as admin
  3. Setup Terms of Service and Privacy Policy on http://127.0.0.1:3000/admin/application_settings/general
  4. Register a new user
  5. Login as admin
  6. Change terms
  7. Login as that new user
  8. You should be redirected to the Terms Page

MR acceptance checklist

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

cc @luzhiyuan.deer @icbd @prajnamas

Edited by ARCHIVED - Martin Tan

Merge request reports