Metadecidim
Sign in

Process

Co-creating the roadmap 2025–2027

finished not yet on protocol

Hide picture, bio and personal url for blocked users, even for logged in users

Is your feature request related to a problem? Please describe.

I was checking our visit logs on Matomo the other day and realised that a lot of visitors simply load spam user profile pages from our platforms. Probably to increase the traffic on these profile pages in order to increase the popularity of the links they put there.

Initially, I thought blocking these users would also make these profile pages unavailable. But it turns out that no, they are still perfectly available, the only change is that the page displays "Blocked user" as the username...

EDIT: I just realised a big nuance:

  • user profiles are visible online, even for unregistered visitors
  • blocked user profiles are actually not, which is a much better compromise!

I still think hiding the content on their profile to other registered users would be better but the problem seems less serious than I thought.

See an example here on try.decidim.org (External link) (External link).

Describe the solution you'd like

Profile pages should at a minimum be stripped from their content when the user is blocked. For many of these users, that's the main reason to block them.

In practice, that means hiding:

  • their profile picture
  • their bio
  • the personal URL

Describe alternatives you've considered

An alternative could be to make the whole profile page impossible to reach. In that case, the user should be shown an error message, maybe something like "This user was blocked so their profile page is no longer available". In the case where they still have content on the platform, their username would be greyed out and non clickable.

Could this issue impact on users private data?
No

Funded by
Awaiting funding.

8 comments

  1. This proposal is also suggested as part of this other proposal by @aramgob

    Automatically report potential spam users

    0 votes up 0 votes down
  2. A partner told us, just yesterday, that they tried this approach, and the result was that spammers started publishing proposals and other things, so the solution produced a worst situation since those publications were more visible.

    0 votes up 0 votes down
    1. Hi!

      That's good to know! And I agree with your point, we need to be smart and address the problem as a whole to avoid side effects.

      We have proposal and comment spam as well although I wouldn't say that this is a result of us preventing them from creating advertising profiles. Yesterday, one of our platform had a spam attack with about a hundred comments within a few hours. They came faster than we could moderate them. The only solution was to close the comments.

      I think this improvement should be implemented as a part of a bigger effort. But if I block a user, it's often because they have inappropriate content in their profile so the expected behaviour should be to hide this content.

      1 votes up 0 votes down
  3. Hey @pierre ! Has there been any updates on this change? We have added one more layer to it in our proposal

    Hide contributions from blocked users (without having to do it manually)

    "Hide contributions from blocked users (without having to do it manually)" and since bots are not going extinct any time soon, it might be interesting to make life easier for admins, as well as cleaning up the platforms from spam profiles (as you suggest).

    0 votes up 0 votes down
    1. Hi Simonas, I made this last Spring to solve the issue. Check it out!
      https://github.com/digidemlab/decidim-module-faceless

      0 votes up 0 votes down
  4. Added as functionality in core via: https://github.com/decidim/decidim/pull/10119

    0 votes up 0 votes down
  5. > Initially, I thought blocking these users would also make these profile pages unavailable. But it turns out that no, they are still perfectly available, the only change is that the page displays "Blocked user" as the username...

    This is something that also bothered me, but when I've started to find the solution, I found out that what you're seeing is something else: the profile is still available but only for admin users.

    You can check it out with these steps:

    1) Log in as admin, report and block a participant
    2) Enter to the profile link (ie http://localhost:3000/profiles/XXX/activity). See that it says "Blocked user". Copy this URL.
    3) Open an incognito tab without any user account (ie as a visitor). Paste the URL. In development you should see an Exception (Action Controller: Exception caught, Routing Error - Blocked user). In production, its a 404 (you can check it out with the `curl -I` command)
    4) Open an incognito tab and log in with a user account (ie as a registered participant that isn't admin). Paste the URL. In development you should see an Exception (Action Controller: Exception caught, Routing Error - Blocked user). In production, its a 404 (you can check it out with the `curl -I` command)

    Code-wise, this is happening because we're actually raising this error if the user is blocked and if the current user isn't an admin:

    https://github.com/decidim/decidim/blob/db91cf387557bfccee917e744303b25d06c691c4/decidim-core/app/controllers/decidim/user_activities_controller.rb#L18

    As I said, for me the real issue is that **as an admin, you're seeing things that others participants aren't seeing**. A similar thing also happens in other situations, like when there's a resource (like a meeting) or even a component or a space that isn't published, but you can visit as a participant (ie in the frontend) and the system isn't showing you that this actually isn't published yet, and that you can see this but other people no.

    So, for me there would be two possible solutions for this:

    1. To show some kind of message like "you're seeing this because you're an admin"
    2. To just drop the check if the current user isn't an admin and to raise the "Blocked User" exception always, but I think that the original idea was that other admins could check for a particular blocked user past activity and things like that.

    I would like to hear feedback on these (or other) solutions.

    0 votes up 0 votes down
    1. I stand corrected, thank you! I think some banner and maybe greying the elements of the page would be good. Or maybe just a popup? A bit like what apps show you when the file has been moved to the trash?

      I think blocking completely might cause some other issues and it doesn't solve the issue when previewing unpublished components or meetings.

      0 votes up 0 votes down

Sign in with your Atmosphere account to comment.