add: user ban_reason
This commit is contained in:
parent
b25bda29b8
commit
d1c3643574
11 changed files with 100 additions and 9 deletions
|
@ -87,7 +87,10 @@ macro_rules! get_user_from_token {
|
|||
{
|
||||
Ok(ua) => {
|
||||
if ua.permissions.check_banned() {
|
||||
Some(tetratto_core::model::auth::User::banned())
|
||||
let mut banned_user = tetratto_core::model::auth::User::banned();
|
||||
banned_user.ban_reason = ua.ban_reason;
|
||||
|
||||
Some(banned_user)
|
||||
} else {
|
||||
Some(ua)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue