mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:44:52 -04:00
disable HS from config
This commit is contained in:
parent
e40a510fbf
commit
42c6823827
5 changed files with 21 additions and 1 deletions
|
@ -782,6 +782,10 @@ class Auth(object):
|
|||
error (Error): The error that should be raised if user is to be
|
||||
blocked
|
||||
"""
|
||||
if self.hs.config.hs_disabled:
|
||||
raise AuthError(
|
||||
403, self.hs.config.hs_disabled_message, errcode=Codes.HS_DISABLED
|
||||
)
|
||||
if self.hs.config.limit_usage_by_mau is True:
|
||||
current_mau = yield self.store.get_monthly_active_count()
|
||||
if current_mau >= self.hs.config.max_mau_value:
|
||||
|
|
|
@ -56,6 +56,7 @@ class Codes(object):
|
|||
CONSENT_NOT_GIVEN = "M_CONSENT_NOT_GIVEN"
|
||||
CANNOT_LEAVE_SERVER_NOTICE_ROOM = "M_CANNOT_LEAVE_SERVER_NOTICE_ROOM"
|
||||
MAU_LIMIT_EXCEEDED = "M_MAU_LIMIT_EXCEEDED"
|
||||
HS_DISABLED = "M_HS_DISABLED"
|
||||
|
||||
|
||||
class CodeMessageException(RuntimeError):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue