Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
d14d7b8f
Commit
d14d7b8f
authored
6 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
Rename 'version' param on user consent config
we're going to use it for the version we require too.
parent
413482f5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/config/consent_config.py
+6
-4
6 additions, 4 deletions
synapse/config/consent_config.py
synapse/rest/consent/consent_resource.py
+1
-1
1 addition, 1 deletion
synapse/rest/consent/consent_resource.py
with
7 additions
and
5 deletions
synapse/config/consent_config.py
+
6
−
4
View file @
d14d7b8f
...
@@ -18,19 +18,21 @@ from ._base import Config
...
@@ -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
"""
"""
...
...
This diff is collapsed.
Click to expand it.
synapse/rest/consent/consent_resource.py
+
1
−
1
View file @
d14d7b8f
...
@@ -116,7 +116,7 @@ class ConsentResource(Resource):
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment