Allow admins to specify when users to must reaccept terms

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

Admins can specify if terms need to be accepted when they are created. However, Admins should be able to specify if a change requires users to reaccept terms the when they are updated. For example, minor fixes to language or typos might not necessitate users accepting the terms again, but otherwise it should require affirmative confirmation from the users.

Proposal

In Admin Area > Settings > General, in the "Terms of Service and Privacy Policy" section

  • 🆕 checkbox to require users to reaccept the agreement
  • Use radio buttons for optional or required

Figma →

Before After (Default) After
Screenshot_2021-06-17_at_09-50-32_General___Admin_Area After__Default_ TOS___PP

backend considerations

  • Each new version of the updated terms in the database, for auditing reasons.
  • Every time a user accepts an updated terms, log in the db which version they accepted, again for auditing reasons.

Documentation

Update this page in docs to reflect the logic and what will or will not break if users must reaccept terms. This is what Learn more will link to

Implementation plan

backend

see comment: #22086 (comment 878773929)

frontend - 1️⃣

  1. Update app/views/admin/application_settings/_terms.html.haml with the new radio buttons + checkbox structure using the backend provided values
  2. Add a new JS script for the /admin/application_settings/general page to show/hide the checkbox when the radio button option is selected
  3. Add specs to check the script works as expected and the HAML form submits correctly
Edited by 🤖 GitLab Bot 🤖