add: user is_deactivated
This commit is contained in:
parent
9ccbc69405
commit
63d3c2350d
13 changed files with 243 additions and 30 deletions
|
@ -192,6 +192,19 @@ macro_rules! user_banned {
|
|||
#[macro_export]
|
||||
macro_rules! check_user_blocked_or_private {
|
||||
($user:expr, $other_user:ident, $data:ident, $jar:ident) => {
|
||||
// check is_deactivated
|
||||
if $other_user.is_deactivated {
|
||||
return Err(Html(
|
||||
render_error(
|
||||
Error::GeneralNotFound("user".to_string()),
|
||||
&$jar,
|
||||
&$data,
|
||||
&$user,
|
||||
)
|
||||
.await,
|
||||
));
|
||||
}
|
||||
|
||||
// check require_account
|
||||
if $user.is_none() && $other_user.settings.require_account {
|
||||
return Err(Html(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue