summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-13 18:00:23 +0100
committerNeil Johnson <neil@matrix.org>2018-08-13 18:00:23 +0100
commit0d43f991a19840a224d3dac78d79f13d78212ee6 (patch)
tree778eca81a206707ccf0d8596f8744f71f25233f9 /synapse/api/auth.py
parentRun tests under PostgreSQL (#3423) (diff)
downloadsynapse-0d43f991a19840a224d3dac78d79f13d78212ee6.tar.xz
support admin_email config and pass through into blocking errors, return AuthError in all cases
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 9c62ec4374..4f028078fa 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -781,11 +781,15 @@ class Auth(object):
         """
         if self.hs.config.hs_disabled:
             raise AuthError(
-                403, self.hs.config.hs_disabled_message, errcode=Codes.HS_DISABLED
+                403, self.hs.config.hs_disabled_message,
+                errcode=Codes.HS_DISABLED,
+                admin_email=self.hs.config.admin_email,
             )
         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:
                 raise AuthError(
-                    403, "MAU Limit Exceeded", errcode=Codes.MAU_LIMIT_EXCEEDED
+                    403, "MAU Limit Exceeded",
+                    admin_email=self.hs.config.admin_email,
+                    errcode=Codes.MAU_LIMIT_EXCEEDED
                 )