Fix deactivated user check misapplied to appservice user. (11309062a2)
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -105,10 +105,6 @@ pub(crate) async fn login_route(
|
||||
},
|
||||
};
|
||||
|
||||
if !services.users.is_active_local(&user_id).await {
|
||||
return Err!(Request(UserDeactivated("This user has been deactivated.")));
|
||||
}
|
||||
|
||||
// Generate a new token for the device
|
||||
let (access_token, expires_in) = services
|
||||
.users
|
||||
|
||||
@@ -46,6 +46,10 @@ pub(crate) async fn login_token_route(
|
||||
}
|
||||
|
||||
let sender_user = auth_uiaa(&services, &body).await?;
|
||||
if !services.users.is_active_local(&sender_user).await {
|
||||
return Err!(Request(UserDeactivated("This user has been deactivated.")));
|
||||
}
|
||||
|
||||
let login_token = random_string(TOKEN_LENGTH);
|
||||
let expires_in = services
|
||||
.users
|
||||
|
||||
Reference in New Issue
Block a user