• Skull giver@popplesburger.hilciferous.nl
    link
    fedilink
    arrow-up
    86
    ·
    edit-2
    1 year 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.

    • effward@lemmy.world
      link
      fedilink
      English
      arrow-up
      40
      ·
      1 year ago

      I love that you found this workaround, but arguably that code path should do the admin check, too.

      • I agree, I think it was just an oversight. Based on the context, it seems like the code assumes that error handling for anything but “database is gone” is unnecessary. Doing user lookups with those assumptions may be difficult, and I don’t think the Lemmy devs were trying to protect against shenanigans like these.

        I don’t really see what you would gain from blocking a local admin (not like the admin is any less powerful to take action against you) so I wouldn’t expect it to be that bad. I’m a little surprised it’s not possible to block admins in the first place.

        I can’t be bothered to actually check if the import does indeed allow blocking local instance admins; I just assumed so based on a quick read of the code. This seems like a rather unimportant bug, but if someone cares they should probably file an issue (or, even better, a pull request).

  • Katlah@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    70
    ·
    1 year ago

    If you need to block your local instance admin then you probably shouldn’t be using that instance…

    • snooggums@kbin.social
      link
      fedilink
      arrow-up
      17
      ·
      1 year ago

      In a lot of communities there is frequently one jackass in power while everyone else in power is cool, and being able to ignore that one person is helpful to avoid their behavior from spoiling the fun of the community for me.

        • snooggums@kbin.social
          link
          fedilink
          arrow-up
          3
          arrow-down
          1
          ·
          1 year ago

          While I agree when their jackassery is due to them being a racist/misogynist/homophobe/etc. that letting them stick around is a good sign the rest of those in power are also terrible, sometimes they are just a jackass because of having an abrasive personality or jumping into conversations and being annoying about some subject they care too much about. Think less malicious and more juvenile to the point that blocking them is necessary to enjoy the rest of the community.

          I have found zero tolerance means that no place will be acceptable. But yes, if blocking is due to them being hateful then it isn’t worth sticking around.

        • Norgur@kbin.social
          link
          fedilink
          arrow-up
          4
          arrow-down
          2
          ·
          1 year ago

          Can we not pretend that “asshole” is some objective measurement? What looks like someone you really don’t want in your life can be completely irrelevant to others. So you can’t judge all mods because that person you find offensive obviously has to be offensive to everyone else.

    • MentalEdge@sopuli.xyz
      link
      fedilink
      arrow-up
      46
      ·
      edit-2
      1 year ago

      You can definitely block mods, and also admins of other instances.

      But I don’t think you can block your own instances admins, but if those people are worth blocking maybe you shouldn’t be on that instance…

    • CluckN@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Does blocking mean the blocked user can no longer see your posts/activity? Therefore blocking a mod would make it harder for them to ban you?

      • unalivejoy@lemm.ee
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        Blocking means you no longer see their posts, and they can’t comment on any of your posts. If they’ve already commented or replied to you, the messages are deleted (hidden?).

      • Arthur Besse@lemmy.ml
        link
        fedilink
        English
        arrow-up
        10
        arrow-down
        3
        ·
        edit-2
        1 year ago

        Works fine on Sync :,)

        It sounds like Sync is either blocking users client-side (which would be confusing, since server-side blocks do exist), or it is trying and failing to add a block server-side but suppressing the server’s error message.

        either way, it sounds like a bug.

        do you know where the project’s github is so someone can open an issue about it? /s (explanation here on mouseover)

        • PsychedSy@sh.itjust.works
          link
          fedilink
          arrow-up
          8
          ·
          1 year ago

          Sync has filtering done in-app. Maybe that’s what they’re referring to.

          And when reddit went ham on third party apps the developer asked his users what to do and we asked him to port to lemmy.

  • Norgur@kbin.social
    link
    fedilink
    arrow-up
    19
    ·
    1 year ago

    Erm… I think you can’t block that admin. Just a hunch, but that might be what’s up here.

  • pinkdrunkenelephants@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Just use an account from a different server and then block the admins before you post. That way they can’t give you any problems or censor you.

    It’s reason #4647386 why Lemmy and federation itself is broken.

    But you can and really should do it.