diff options
author | Neil Johnson <neil@fragile.org.uk> | 2018-08-04 22:07:04 +0100 |
---|---|---|
committer | Neil Johnson <neil@fragile.org.uk> | 2018-08-04 22:07:04 +0100 |
commit | 42c6823827a12cdb4374bc6e64d32d4ce4f526ec (patch) | |
tree | a0dbc9edfea7853ee1631a740a2b3ba085660841 /synapse/api/auth.py | |
parent | py3 fix (diff) | |
download | synapse-42c6823827a12cdb4374bc6e64d32d4ce4f526ec.tar.xz |
disable HS from config
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index d8ebbbc6e8..089f166152 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -782,6 +782,10 @@ class Auth(object): error (Error): The error that should be raised if user is to be blocked """ + if self.hs.config.hs_disabled: + raise AuthError( + 403, self.hs.config.hs_disabled_message, errcode=Codes.HS_DISABLED + ) if self.hs.config.limit_usage_by_mau is True: current_mau = yield self.store.get_monthly_active_count() if current_mau >= self.hs.config.max_mau_value: |