1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

Add a way to lock users

This commit is contained in:
Quentin Gliech
2023-07-28 18:25:54 +02:00
parent 8f01d1198c
commit 40b49cdd10
16 changed files with 277 additions and 12 deletions

View File

@@ -188,6 +188,7 @@ pub(crate) async fn post(
.browser_session()
.lookup(session.user_session_id)
.await?
.filter(|b| b.user.is_valid())
// XXX: is that the right error to bubble up?
.ok_or(RouteError::UnknownToken)?;
@@ -227,6 +228,7 @@ pub(crate) async fn post(
.browser_session()
.lookup(session.user_session_id)
.await?
.filter(|b| b.user.is_valid())
// XXX: is that the right error to bubble up?
.ok_or(RouteError::UnknownToken)?;
@@ -265,6 +267,7 @@ pub(crate) async fn post(
.user()
.lookup(session.user_id)
.await?
.filter(mas_data_model::User::is_valid)
// XXX: is that the right error to bubble up?
.ok_or(RouteError::UnknownToken)?;
@@ -311,6 +314,7 @@ pub(crate) async fn post(
.user()
.lookup(session.user_id)
.await?
.filter(mas_data_model::User::is_valid)
// XXX: is that the right error to bubble up?
.ok_or(RouteError::UnknownToken)?;