Jonathan de Jong
4b965c862d
Remove redundant "coding: utf-8" lines ( #9786 )
Part of #9744
Removes all redundant `# -*- coding: utf-8 -*-` lines from files, as python 3 automatically reads source code as utf-8 now.
`Signed-off-by: Jonathan de Jong <jonathan@automatia.nl>`
il y a 3 ans
Patrick Cloke
e54746bdf7
Clean-up the template loading code. ( #9200 )
* Enables autoescape by default for HTML files.
* Adds a new read_template method for reading a single template.
* Some logic clean-up.
il y a 3 ans
Patrick Cloke
34ff8da83b
Convert additional templates to Jinja ( #8444 )
This converts a few more of our inline HTML templates to Jinja. This is somewhat part of #7280 and should make it a bit easier to customize these in the future.
il y a 3 ans
Patrick Cloke
8a4a4186de
Simplify super() calls to Python 3 syntax. ( #8344 )
This converts calls like super(Foo, self) -> super().
Generated with:
sed -i "" -Ee 's/super\([^\(]+\)/super()/g' **/*.py
il y a 3 ans
Andrew Morgan
409c62b27b
Add config linting script that checks for bool casing ( #6203 )
Add a linting script that enforces all boolean values in the default config be lowercase.
This has annoyed me for a while so I decided to fix it.
il y a 4 ans
Amber Brown
f743108a94
Refactor HomeserverConfig so it can be typechecked ( #6137 )
il y a 4 ans
Amber Brown
864f144543
Fix up some typechecking ( #6150 )
* type checking fixes
* changelog
il y a 4 ans
Richard van der Hoff
16b52642e2
Don't load the generated config as the default.
It's too confusing.
il y a 4 ans
Richard van der Hoff
c3c6b00d95
Pass config_dir_path and data_dir_path into Config.read_config. ( #5522 )
* Pull config_dir_path and data_dir_path calculation out of read_config_files
* Pass config_dir_path and data_dir_path into read_config
il y a 4 ans
Amber Brown
32e7c9e7f2
Run Black. ( #5482 )
il y a 4 ans
Richard van der Hoff
5f9bdf90fe
Attempt to make default config more consistent
The general idea here is that config examples should just have a hash and no
extraneous whitespace, both to make it easier for people who don't understand
yaml, and to make the examples stand out from the comments.
il y a 5 ans
Andrew Morgan
e65a17b26f
Check consent dir path on startup
il y a 5 ans
Travis Ralston
0f5e51f726
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.
il y a 5 ans
Krombel
78a9ddcf9a
rerun isort with latest version
il y a 5 ans
Krombel
4a27000548
check isort by travis
il y a 5 ans
Richard van der Hoff
219c2a322b
remove trailing whitespace
il y a 6 ans
Richard van der Hoff
2e4be8bfd9
fix english and wrap comment
il y a 6 ans
Ruben Barkow
08ea5fe635
add link to thorough instruction how to configure consent
il y a 6 ans
Richard van der Hoff
66bdae986f
Fix default for send_server_notice_to_guests
bool("False") == True...
il y a 6 ans
Richard van der Hoff
ba1b163590
Avoid sending consent notice to guest users
we think it makes sense not to send the notices to guest users.
il y a 6 ans
Richard van der Hoff
82191b08f6
Support for putting %(consent_uri)s in messages
Make it possible to put the URI in the error message and the server notice that
get sent by the server
il y a 6 ans
Richard van der Hoff
a5e2941aad
Reject attempts to send event before privacy consent is given
Returns an M_CONSENT_NOT_GIVEN error (cf
https://github.com/matrix-org/matrix-doc/issues/1252 ) if consent is not yet
given.
il y a 6 ans
Richard van der Hoff
d5dca9a04f
Move consent config parsing into ConsentConfig
turns out we need to reuse this, so it's better in the config class.
il y a 6 ans
Richard van der Hoff
9ea219c514
Send users a server notice about consent
When a user first syncs, we will send them a server notice asking them to
consent to the privacy policy if they have not already done so.
il y a 6 ans
Richard van der Hoff
d14d7b8fdc
Rename 'version' param on user consent config
we're going to use it for the version we require too.
il y a 6 ans
Richard van der Hoff
47815edcfa
ConsentResource to gather policy consent from users
Hopefully there are enough comments and docs in this that it makes sense on its
own.
il y a 6 ans