• Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    arrow-up
    88
    ·
    edit-2
    10 months ago

    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):

    1. Go to your account settings
    2. Export your user profile
    3. Add the user you wish to block to the blocked_users list (make sure to stick to the JSON format)
    4. Import your backup

    It looks like the code for importing settings does not execute the admin check.