diff options
author | Erik Johnston <erik@matrix.org> | 2019-01-29 22:00:33 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-01-29 22:00:33 +0000 |
commit | a696c48133d9f9a94f8b078aeacce0bef0d693b4 (patch) | |
tree | 8137f14c734d351f52af038265103f275276646a /synapse/config/consent_config.py | |
parent | Update synapse/storage/events_worker.py (diff) | |
parent | Merge pull request #4483 from matrix-org/erikj/event_v2 (diff) | |
download | synapse-a696c48133d9f9a94f8b078aeacce0bef0d693b4.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/redactions_eiah
Diffstat (limited to 'synapse/config/consent_config.py')
-rw-r--r-- | synapse/config/consent_config.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/synapse/config/consent_config.py b/synapse/config/consent_config.py index f193a090ae..9f2e85342f 100644 --- a/synapse/config/consent_config.py +++ b/synapse/config/consent_config.py @@ -13,6 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. +from os import path + +from synapse.config import ConfigError + from ._base import Config DEFAULT_CONFIG = """\ @@ -85,7 +89,15 @@ class ConsentConfig(Config): if consent_config is None: return self.user_consent_version = str(consent_config["version"]) - self.user_consent_template_dir = consent_config["template_dir"] + self.user_consent_template_dir = self.abspath( + consent_config["template_dir"] + ) + if not path.isdir(self.user_consent_template_dir): + raise ConfigError( + "Could not find template directory '%s'" % ( + self.user_consent_template_dir, + ), + ) self.user_consent_server_notice_content = consent_config.get( "server_notice_content", ) |