mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-26 16:39:24 -05:00
assert rather than warn
This commit is contained in:
parent
0b01281e77
commit
301cb60d0b
@ -783,6 +783,7 @@ class Auth(object):
|
|||||||
Args:
|
Args:
|
||||||
user_id(str|None): If present, checks for presence against existing
|
user_id(str|None): If present, checks for presence against existing
|
||||||
MAU cohort
|
MAU cohort
|
||||||
|
|
||||||
threepid(dict|None): If present, checks for presence against configured
|
threepid(dict|None): If present, checks for presence against configured
|
||||||
reserved threepid. Used in cases where the user is trying register
|
reserved threepid. Used in cases where the user is trying register
|
||||||
with a MAU blocked server, normally they would be rejected but their
|
with a MAU blocked server, normally they would be rejected but their
|
||||||
@ -803,9 +804,7 @@ class Auth(object):
|
|||||||
limit_type=self.hs.config.hs_disabled_limit_type
|
limit_type=self.hs.config.hs_disabled_limit_type
|
||||||
)
|
)
|
||||||
if self.hs.config.limit_usage_by_mau is True:
|
if self.hs.config.limit_usage_by_mau is True:
|
||||||
|
assert not (user_id and threepid)
|
||||||
if user_id and threepid:
|
|
||||||
logger.warn("Called with both user_id and threepid, this shoudn't happen")
|
|
||||||
|
|
||||||
# If the user is already part of the MAU cohort or a trial user
|
# If the user is already part of the MAU cohort or a trial user
|
||||||
if user_id:
|
if user_id:
|
||||||
|
Loading…
Reference in New Issue
Block a user