summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-14 14:51:38 +0100
committerNeil Johnson <neil@matrix.org>2018-08-14 14:51:38 +0100
commit9b5bf3d8581408a417e680c3d5c118a368e51c20 (patch)
tree8e024ada77d93f547913d23e9ad20885d3632c0d /synapse/api/auth.py
parentMerge branch 'neilj/mau_sync_block' of github.com:matrix-org/synapse into nei... (diff)
parentset admin email via config (diff)
downloadsynapse-9b5bf3d8581408a417e680c3d5c118a368e51c20.tar.xz
Merge branch 'neilj/admin_email' of github.com:matrix-org/synapse into neilj/fix_off_by_1+maus
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 c31c6a6a08..a9cc322d7e 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -784,7 +784,9 @@ 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:
             # If the user is already part of the MAU cohort
@@ -796,5 +798,7 @@ class Auth(object):
             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
                 )