Enforcing agreement to the usage terms¶
Make everyone tick I have read and agree before they can sign in, and make them agree again whenever you change the wording. Do this when the terms must be explicitly accepted rather than implied by signing in.
Requires: the edit role token (any site administrator). The site must
have some text in Usage Terms; the switch and the date are disabled while
it is blank.
Steps¶
- Open the header cog → Site Config and stay on the General tab.
- Under Usage Terms, enter or update the wording in Usage Terms (Markdown). The Preview below shows how it will render.
- Turn on Require explicit agreement at sign-in.
- Set Terms effective date to the date this wording applies from (usually today). Leave it blank only if people should be asked once and never again, whatever later edits you make.
- Click Save Settings. The toast Site Settings were updated! confirms the save.
To make everyone re-affirm after changing the wording, repeat steps 2 and 4, moving the date forward, and save. Changing the text without moving the date does not re-ask anyone.
Result¶
From the next sign-in, anyone who has not agreed to the current wording sees
the terms in place of the sign-in form after entering their password, and
must tick the box and click Agree and continue. People who have already
agreed to the current wording sign in as before. Each agreement is recorded
in the contactTermsAcceptance table with the date, IP address, and the
wording shown. Open sessions are not interrupted.
If it fails¶
- The switch or date is greyed out: Usage Terms (Markdown) is blank. Enter the wording first.
- People are not being asked: check the switch was on when you saved, and that the wording is not blank. Also note that only the standard sign-in form runs the gate; API token exchanges and Microsoft/Google sign-in do not.
- Someone sees We could not record your agreement: the API could not
write to
contactTermsAcceptance. Runhandlers/usage-terms-schema-migration.sqlfrom API module v3_8_0 or v3_8_1 (identical) on that environment's database (the service also tries to create the table itself, but needs CREATE privilege to do so). - Save Settings fails: you need the
editrole token.