summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-03-21 14:10:31 +0000
committerErik Johnston <erik@matrix.org>2019-03-21 14:10:31 +0000
commitb0bf1ea7bda4894bae92a895c957a1a2ce431f4e (patch)
treec1ab07c55925e9c50aa0b7b55b4984bb9fc464e0 /synapse/api/auth.py
parentMerge branch 'develop' into matrix-org-hotfixes (diff)
parentMerge pull request #4908 from matrix-org/erikj/block_peek_on_blocked_rooms (diff)
downloadsynapse-b0bf1ea7bda4894bae92a895c957a1a2ce431f4e.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py

index 5992d30623..ee646a97e8 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py
@@ -788,9 +788,11 @@ class Auth(object): # Never fail an auth check for the server notices users or support user # This can be a problem where event creation is prohibited due to blocking - is_support = yield self.store.is_support_user(user_id) - if user_id == self.hs.config.server_notices_mxid or is_support: - return + if user_id is not None: + if user_id == self.hs.config.server_notices_mxid: + return + if (yield self.store.is_support_user(user_id)): + return if self.hs.config.hs_disabled: raise ResourceLimitError(