Only allow distinguishing own comments (fixes #4216)

distinguish-own-comment
Felix Ableitner 7 months ago
parent 70003407a7
commit 92fcd0fc34

@ -26,6 +26,11 @@ pub async fn distinguish_comment(
)
.await?;
// Verify that only the creator can distinguish
if local_user_view.person.id != orig_comment.creator.id {
Err(LemmyErrorType::NoCommentEditAllowed)?
}
// Verify that only a mod or admin can distinguish a comment
check_community_mod_action(
&local_user_view.person,

Loading…
Cancel
Save