Fix deactivated user check misapplied to appservice user. (11309062a2)
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
432e6a2663
commit
977f9e2e2e
2 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue