feat: completely block banned users tokens
This commit is contained in:
parent
f26c04aca2
commit
1f1360760a
1 changed files with 4 additions and 0 deletions
|
|
@ -231,6 +231,10 @@ impl<'r, const FORCE_BEARER_AUTH: bool> FromRequest<'r> for Auth<FORCE_BEARER_AU
|
||||||
return Outcome::Error((Status::BadRequest, INVALID_TOKEN_ERRORS));
|
return Outcome::Error((Status::BadRequest, INVALID_TOKEN_ERRORS));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if user.account_level < 0{
|
||||||
|
return Outcome::Error((Status::BadRequest, INVALID_TOKEN_ERRORS));
|
||||||
|
}
|
||||||
|
|
||||||
let user = User{
|
let user = User{
|
||||||
nex_password: format!("{:a>16}", user.nex_password),
|
nex_password: format!("{:a>16}", user.nex_password),
|
||||||
..user
|
..user
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue