diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2019-03-19 12:22:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-19 12:22:13 +0000 |
commit | 7872638c31b2d8acf41196ae71159188ba87763d (patch) | |
tree | 6a6e9743f1c6926690c6e070abec0dbc5efc0fa7 /synapse/api/auth.py | |
parent | fix test_auto_create_auto_join_where_no_consent (#4886) (diff) | |
parent | Enforce hs_disabled_message correctly (diff) | |
download | synapse-7872638c31b2d8acf41196ae71159188ba87763d.tar.xz |
Merge pull request #4888 from matrix-org/rav/fix_disabled_hs
Enforce hs_disabled_message correctly
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 8 |
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( |