Terms of Service: Add ability to update TOS and have users re-sign.

Most directly useful for the migration to zulipchat.com.

Creates a new field in UserProfile to store the tos_version, as well as two
new settings TOS_VERSION and FIRST_TIME_TOS_TEMPLATE. We check for a version
mismatch between what the user has signed and the current
settings.TOS_VERSION whenever the user hits the home page, and redirect them
if needed.

Note that accounts_accept_terms.html and
zerver.views.accounts_accept_terms were unused before this commit
(they date from c327446537)
This commit is contained in:
Rishi Gupta
2016-08-09 18:05:26 -07:00
committed by Tim Abbott
parent a648513580
commit 7910a6e134
10 changed files with 76 additions and 55 deletions

View File

@@ -69,6 +69,11 @@ else:
# Terms of Service
TERMS_OF_SERVICE = 'corporate/terms.md'
# Major version number (the stuff before the first '.') has to be an integer.
# Users will be asked to re-sign the TOS only when the major version number increases.
# A TOS_VERSION of None has a major version number of -1.
# TOS_VERSION = '1.0'
# FIRST_TIME_TOS_TEMPLATE = 'zulipchat_migration_tos.html'
# Legacy zulip.com bucket used for old-style S3 uploads.
S3_BUCKET="humbug-user-uploads"