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
- User must accept the latest version of terms, or they will be redirected to the terms page
- The redirection of terms is placed before the onboarding process
- It's GitLab Free
- 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
How to set up and validate locally
- In rails console enable the experiment fully
Feature.enable(:enforce_acceptance_of_changed_terms)
- Login as admin
- Setup
Terms of Service and Privacy Policy
onhttp://127.0.0.1:3000/admin/application_settings/general
- Register a new user
- Login as admin
- Change terms
- Login as that new user
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by ARCHIVED - Martin Tan