diff options
author | Neil Johnson <neil@matrix.org> | 2018-11-12 17:58:49 +0000 |
---|---|---|
committer | Neil Johnson <neil@matrix.org> | 2018-11-12 17:58:49 +0000 |
commit | eaac29f7ef3fbc90512dd6509a761c040e2d7840 (patch) | |
tree | 5042c1ec7840329084896a75ca48fffd673b29a2 /synapse/api | |
parent | remove white space (diff) | |
download | synapse-eaac29f7ef3fbc90512dd6509a761c040e2d7840.tar.xz |
move to db backed support user
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/auth.py | 5 | ||||
-rw-r--r-- | synapse/api/constants.py | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 34382e4e3c..8250157ebd 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -791,9 +791,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: + if (user_id == self.hs.config.server_notices_mxid or + user_id == self.hs.config.support_user_id): return if self.hs.config.hs_disabled: diff --git a/synapse/api/constants.py b/synapse/api/constants.py index f20e0fcf0b..f6f2d6bd6f 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -105,7 +105,6 @@ class RoomVersions(object): VDH_TEST = "vdh-test-version" STATE_V2_TEST = "state-v2-test" - # the version we will give rooms which are created on this server DEFAULT_ROOM_VERSION = RoomVersions.V1 @@ -119,3 +118,9 @@ KNOWN_ROOM_VERSIONS = { ServerNoticeMsgType = "m.server_notice" ServerNoticeLimitReached = "m.server_notice.usage_limit_reached" + + +# Allows for user type specific behaviour, if we'd had a crystal ball would +# probably have included admin and guest, normal users are type None +class UserTypes(object): + SUPPORT = "support" |