summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorNeil Johnson <neil@fragile.org.uk>2018-08-18 12:33:07 +0100
committerNeil Johnson <neil@fragile.org.uk>2018-08-18 12:33:07 +0100
commitc5171bf171ae28596c4e101e9dcc61bad7bcae63 (patch)
tree14196131e610f94f4d0245fe84765774961e3478 /synapse/api/auth.py
parentspecial case server_notices_mxid (diff)
downloadsynapse-c5171bf171ae28596c4e101e9dcc61bad7bcae63.tar.xz
special case server_notices_mxid
Diffstat (limited to '')
-rw-r--r--synapse/api/auth.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 022211e34e..55384d6ffe 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -783,6 +783,12 @@ class Auth(object):
             user_id(str|None): If present, checks for presence against existing
             MAU cohort
         """
+
+        # Never fail an auth check for the server notices users
+        # This can be a problem where event creation is prohibited due to blocking
+        if user_id == self.hs.config.server_notices_mxid:
+            return
+
         if self.hs.config.hs_disabled:
             raise ResourceLimitError(
                 403, self.hs.config.hs_disabled_message,