feat: completely block banned users tokens

This commit is contained in:
Maple 2025-07-31 02:58:17 +02:00
commit 1f1360760a

View file

@ -230,6 +230,10 @@ impl<'r, const FORCE_BEARER_AUTH: bool> FromRequest<'r> for Auth<FORCE_BEARER_AU
let Some(user) = user else {
return Outcome::Error((Status::BadRequest, INVALID_TOKEN_ERRORS));
};
if user.account_level < 0{
return Outcome::Error((Status::BadRequest, INVALID_TOKEN_ERRORS));
}
let user = User{
nex_password: format!("{:a>16}", user.nex_password),