feat: completely block banned users tokens
This commit is contained in:
parent
f26c04aca2
commit
1f1360760a
1 changed files with 4 additions and 0 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue