diff --git a/crates/api_crud/src/post/remove.rs b/crates/api_crud/src/post/remove.rs index 682ed75d3..78e4560ce 100644 --- a/crates/api_crud/src/post/remove.rs +++ b/crates/api_crud/src/post/remove.rs @@ -5,7 +5,7 @@ use lemmy_api_common::{ context::LemmyContext, post::{PostResponse, RemovePost}, send_activity::{ActivityChannel, SendActivityData}, - utils::check_community_mod_action, + utils::{check_community_mod_action, check_is_higher_mod_or_admin}, }; use lemmy_db_schema::{ source::{ @@ -37,6 +37,14 @@ pub async fn remove_post( ) .await?; + check_is_higher_mod_or_admin( + &mut context.pool(), + &local_user_view, + orig_post.community_id, + &[orig_post.creator_id], + ) + .await?; + // Update the post let post_id = data.post_id; let removed = data.removed;