summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-09 10:41:43 +0000
committerGitHub <noreply@github.com>2018-08-09 10:41:43 +0000
commit0ad98e38d0c5f6fde18032551cccb291659b9204 (patch)
tree925f1657770ba47599169763dc1be02b6156923d /synapse/api/auth.py
parentMerge branch 'master' into develop (diff)
parentfix pep8 too many lines (diff)
downloadsynapse-0ad98e38d0c5f6fde18032551cccb291659b9204.tar.xz
Merge pull request #3655 from matrix-org/neilj/disable_hs
Flag to disable HS without disabling federation
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py

index 91b23ff1d7..9c62ec4374 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py
@@ -779,6 +779,10 @@ class Auth(object): """Checks if the user should be rejected for some external reason, such as monthly active user limiting or global disable flag """ + 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: