fix: profile panic
This commit is contained in:
parent
fe1e53c47a
commit
7d30d65a3b
1 changed files with 7 additions and 5 deletions
|
@ -194,11 +194,13 @@ macro_rules! check_user_blocked_or_private {
|
|||
($user:expr, $other_user:ident, $data:ident, $jar:ident) => {
|
||||
// check is_deactivated
|
||||
if ($user.is_none() && $other_user.is_deactivated)
|
||||
| !$user
|
||||
| ($user.is_some()
|
||||
&& !$user
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
.permissions
|
||||
.check(tetratto_core::model::permissions::FinePermission::MANAGE_USERS)
|
||||
&& $other_user.is_deactivated)
|
||||
{
|
||||
return Err(Html(
|
||||
render_error(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue