diff options
author | Travis Ralston <travpc@gmail.com> | 2018-11-06 03:32:34 -0700 |
---|---|---|
committer | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2018-11-06 10:32:34 +0000 |
commit | 0f5e51f726756318f355d988856730a9930e2d2f (patch) | |
tree | f01b2b5e438f669497e24dad108b23cb4a81ba7c /synapse/rest | |
parent | handle empty backups according to latest spec proposal (#4123) (diff) | |
download | synapse-0f5e51f726756318f355d988856730a9930e2d2f.tar.xz |
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.
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/register.py | 2 | ||||
-rw-r--r-- | synapse/rest/consent/consent_resource.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/v2_alpha/register.py b/synapse/rest/client/v2_alpha/register.py index c5214330ad..0515715f7c 100644 --- a/synapse/rest/client/v2_alpha/register.py +++ b/synapse/rest/client/v2_alpha/register.py @@ -360,7 +360,7 @@ class RegisterRestServlet(RestServlet): ]) # Append m.login.terms to all flows if we're requiring consent - if self.hs.config.block_events_without_consent_error is not None: + if self.hs.config.user_consent_at_registration: new_flows = [] for flow in flows: flow.append(LoginType.TERMS) diff --git a/synapse/rest/consent/consent_resource.py b/synapse/rest/consent/consent_resource.py index c85e84b465..e0f7de5d5c 100644 --- a/synapse/rest/consent/consent_resource.py +++ b/synapse/rest/consent/consent_resource.py @@ -142,7 +142,7 @@ class ConsentResource(Resource): userhmac = None has_consented = False public_version = username == "" - if not public_version: + if not public_version or not self.hs.config.user_consent_at_registration: userhmac = parse_string(request, "h", required=True, encoding=None) self._check_hash(username, userhmac) |