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.
This commit is contained in:
Neil Johnson 2018-12-14 18:20:59 +00:00 committed by GitHub
parent e93a0ebf50
commit d2f7c4e6b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 371 additions and 47 deletions

View file

@ -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: