fix: check can_del
This commit is contained in:
@@ -85,7 +85,7 @@ async fn p2output(p: &Post, user: &CurrentUser, db: &Db, rconn: RdsConn) -> Post
|
|||||||
None
|
None
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
can_del: user.is_admin || p.author_hash == user.namehash,
|
can_del: p.check_permission(user, "wd").is_ok(),
|
||||||
attention: Attention::init(&user.namehash, rconn.clone())
|
attention: Attention::init(&user.namehash, rconn.clone())
|
||||||
.has(p.id)
|
.has(p.id)
|
||||||
.await
|
.await
|
||||||
|
|||||||
Reference in New Issue
Block a user