mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-30 00:01:25 +00:00
Don't allow deleted users to do actions. Fixes #1656
This commit is contained in:
parent
353a1fe0a0
commit
8479d820ad
1 changed files with 5 additions and 0 deletions
|
@ -272,6 +272,11 @@ pub async fn get_local_user_view_from_jwt(
|
||||||
return Err(ApiError::err("site_ban").into());
|
return Err(ApiError::err("site_ban").into());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check for user deletion
|
||||||
|
if local_user_view.person.deleted {
|
||||||
|
return Err(ApiError::err("deleted").into());
|
||||||
|
}
|
||||||
|
|
||||||
check_validator_time(&local_user_view.local_user.validator_time, &claims)?;
|
check_validator_time(&local_user_view.local_user.validator_time, &claims)?;
|
||||||
|
|
||||||
Ok(local_user_view)
|
Ok(local_user_view)
|
||||||
|
|
Loading…
Reference in a new issue