Add config variables for enabling terms auth and the policy name (#4142)

So people can still collect consent the old way if they want to.
This commit is contained in:
Travis Ralston 2018-11-06 03:32:34 -07:00 committed by Richard van der Hoff
parent f1087106cf
commit 0f5e51f726
10 changed files with 65 additions and 11 deletions

View file

@ -42,7 +42,8 @@ class TermsTestCase(unittest.HomeserverTestCase):
hs.config.enable_registration_captcha = False
def test_ui_auth(self):
self.hs.config.block_events_without_consent_error = True
self.hs.config.user_consent_at_registration = True
self.hs.config.user_consent_policy_name = "My Cool Privacy Policy"
self.hs.config.public_baseurl = "https://example.org"
self.hs.config.user_consent_version = "1.0"
@ -66,7 +67,7 @@ class TermsTestCase(unittest.HomeserverTestCase):
"policies": {
"privacy_policy": {
"en": {
"name": "Privacy Policy",
"name": "My Cool Privacy Policy",
"url": "https://example.org/_matrix/consent?v=1.0",
},
"version": "1.0"