diff options
author | Neil Johnson <neil@matrix.org> | 2018-12-14 18:20:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-14 18:20:59 +0000 |
commit | d2f7c4e6b1efbdd3275d02a19220a10cf00a8f66 (patch) | |
tree | 3fc3b14dbbc3effc3974f6f529894c49ef0c1b02 /synapse/api/auth.py | |
parent | Settings Fix deleting e2e room keys on xenial (#4295) (diff) | |
download | synapse-d2f7c4e6b1efbdd3275d02a19220a10cf00a8f66.tar.xz |
create support user (#4141)
Allow for the creation of a support user. A support user can access the server, join rooms, interact with other users, but does not appear in the user directory nor does it contribute to monthly active user limits.
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 5309899703..b8a9af7158 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -802,9 +802,10 @@ class Auth(object): threepid should never be set at the same time. """ - # Never fail an auth check for the server notices users + # 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 - if user_id == self.hs.config.server_notices_mxid: + is_support = yield self.store.is_support_user(user_id) + if user_id == self.hs.config.server_notices_mxid or is_support: return if self.hs.config.hs_disabled: |