mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 14:04:47 -04:00
Don't push if an user account has expired (#8353)
This commit is contained in:
parent
4bb203ea4f
commit
916bb9d0d1
4 changed files with 34 additions and 5 deletions
|
@ -218,11 +218,7 @@ class Auth:
|
|||
# Deny the request if the user account has expired.
|
||||
if self._account_validity.enabled and not allow_expired:
|
||||
user_id = user.to_string()
|
||||
expiration_ts = await self.store.get_expiration_ts_for_user(user_id)
|
||||
if (
|
||||
expiration_ts is not None
|
||||
and self.clock.time_msec() >= expiration_ts
|
||||
):
|
||||
if await self.store.is_account_expired(user_id, self.clock.time_msec()):
|
||||
raise AuthError(
|
||||
403, "User account has expired", errcode=Codes.EXPIRED_ACCOUNT
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue