Zevlen@lemm.ee to Lemmy Shitpost@lemmy.worldEnglish · 1 year agoCan't block admin?lemm.eeimagemessage-square13fedilinkarrow-up1180arrow-down110file-text
arrow-up1170arrow-down1imageCan't block admin?lemm.eeZevlen@lemm.ee to Lemmy Shitpost@lemmy.worldEnglish · 1 year agomessage-square13fedilinkfile-text
minus-squareSkull giver@popplesburger.hilciferous.nllinkfedilinkarrow-up81·edit-21 year agoSource code for the code responsible for this error message: let target_user = LocalUserView::read_person(&mut context.pool(), target_id).await; if target_user.map(|t| t.local_user.admin) == Ok(true) { Err(LemmyErrorType::CantBlockAdmin)? } You can’t block local instance admins. You can ban external admins (those on other servers), and moderators, though. Blocking admins doesn’t make much sense anyway, because admins can probably remove the block from the database if they wanted to be malicious. As a workaround, you can try the following (requires Lemmy 0.19.0 or higher): Go to your account settings Export your user profile Add the user you wish to block to the blocked_users list (make sure to stick to the JSON format) Import your backup It looks like the code for importing settings does not execute the admin check.
Source code for the code responsible for this error message:
let target_user = LocalUserView::read_person(&mut context.pool(), target_id).await; if target_user.map(|t| t.local_user.admin) == Ok(true) { Err(LemmyErrorType::CantBlockAdmin)? }
You can’t block local instance admins. You can ban external admins (those on other servers), and moderators, though.
Blocking admins doesn’t make much sense anyway, because admins can probably remove the block from the database if they wanted to be malicious.
As a workaround, you can try the following (requires Lemmy 0.19.0 or higher):
blocked_users
list (make sure to stick to the JSON format)It looks like the code for importing settings does not execute the admin check.