mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Rename 'version' param on user consent config
we're going to use it for the version we require too.
This commit is contained in:
parent
413482f578
commit
d14d7b8fdc
@ -18,19 +18,21 @@ from ._base import Config
|
|||||||
DEFAULT_CONFIG = """\
|
DEFAULT_CONFIG = """\
|
||||||
# User Consent configuration
|
# User Consent configuration
|
||||||
#
|
#
|
||||||
# uncomment and configure if enabling the 'consent' resource under 'listeners'.
|
# Parts of this section are required if enabling the 'consent' resource under
|
||||||
|
# 'listeners', in particular 'template_dir' and 'version'.
|
||||||
#
|
#
|
||||||
# 'template_dir' gives the location of the templates for the HTML forms.
|
# 'template_dir' gives the location of the templates for the HTML forms.
|
||||||
# This directory should contain one subdirectory per language (eg, 'en', 'fr'),
|
# This directory should contain one subdirectory per language (eg, 'en', 'fr'),
|
||||||
# and each language directory should contain the policy document (named as
|
# and each language directory should contain the policy document (named as
|
||||||
# '<version>.html') and a success page (success.html).
|
# '<version>.html') and a success page (success.html).
|
||||||
#
|
#
|
||||||
# 'default_version' gives the version of the policy document to serve up if
|
# 'version' specifies the 'current' version of the policy document. It defines
|
||||||
# there is no 'v' parameter.
|
# the version to be served by the consent resource if there is no 'v'
|
||||||
|
# parameter.
|
||||||
#
|
#
|
||||||
# user_consent:
|
# user_consent:
|
||||||
# template_dir: res/templates/privacy
|
# template_dir: res/templates/privacy
|
||||||
# default_version: 1.0
|
# version: 1.0
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ class ConsentResource(Resource):
|
|||||||
loader = jinja2.FileSystemLoader(consent_template_directory)
|
loader = jinja2.FileSystemLoader(consent_template_directory)
|
||||||
self._jinja_env = jinja2.Environment(loader=loader)
|
self._jinja_env = jinja2.Environment(loader=loader)
|
||||||
|
|
||||||
self._default_consent_verison = consent_config["default_version"]
|
self._default_consent_verison = consent_config["version"]
|
||||||
|
|
||||||
if hs.config.form_secret is None:
|
if hs.config.form_secret is None:
|
||||||
raise ConfigError(
|
raise ConfigError(
|
||||||
|
Loading…
Reference in New Issue
Block a user