Add management endpoints for account validity

This commit is contained in:
Brendan Abolivier 2019-04-16 20:13:59 +01:00 committed by Erik Johnston
parent 20f0617e87
commit eaf41a943b
8 changed files with 246 additions and 26 deletions

View file

@ -232,7 +232,7 @@ class Auth(object):
if self._account_validity.enabled:
user_id = user.to_string()
expiration_ts = yield self.store.get_expiration_ts_for_user(user_id)
if expiration_ts and self.clock.time_msec() >= expiration_ts:
if expiration_ts is not None and self.clock.time_msec() >= expiration_ts:
raise AuthError(
403,
"User account has expired",