mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 06:11:26 +00:00
Making community ban or add mod also allow higher admins.
This commit is contained in:
parent
e3da031b61
commit
ed0ecf6418
2 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ use lemmy_api_common::{
|
|||
community::{AddModToCommunity, AddModToCommunityResponse},
|
||||
context::LemmyContext,
|
||||
send_activity::{ActivityChannel, SendActivityData},
|
||||
utils::{check_community_mod_action, check_is_higher_mod},
|
||||
utils::{check_community_mod_action, check_is_higher_mod_or_admin},
|
||||
};
|
||||
use lemmy_db_schema::{
|
||||
source::{
|
||||
|
@ -36,7 +36,7 @@ pub async fn add_mod_to_community(
|
|||
|
||||
// If its a mod removal, also check that you're a higher mod.
|
||||
if !data.added {
|
||||
check_is_higher_mod(
|
||||
check_is_higher_mod_or_admin(
|
||||
&mut context.pool(),
|
||||
&local_user_view,
|
||||
community_id,
|
||||
|
|
|
@ -7,7 +7,7 @@ use lemmy_api_common::{
|
|||
utils::{
|
||||
check_community_mod_action,
|
||||
check_expire_time,
|
||||
check_is_higher_mod,
|
||||
check_is_higher_mod_or_admin,
|
||||
remove_user_data_in_community,
|
||||
},
|
||||
};
|
||||
|
@ -49,7 +49,7 @@ pub async fn ban_from_community(
|
|||
)
|
||||
.await?;
|
||||
|
||||
check_is_higher_mod(
|
||||
check_is_higher_mod_or_admin(
|
||||
&mut context.pool(),
|
||||
&local_user_view,
|
||||
data.community_id,
|
||||
|
|
Loading…
Reference in a new issue