Detect the use of spam-bots and ban non compliant users (part 1)#6696
Conversation
Bump develop to next release version
|
The failing test is the flacky one related to maps. |
|
Welcome @roxanaopr on what I think is your first PR! |
Hi @tramuntanal! This pull request is only for part 1 (Implement a way to report users) of the meta-decidim request. For the rest of it we have/will have other PRs |
…-report-user-functionality
…emend-cofe/decidim into feature/add-report-user-functionality
|
ok, thanks for the feedback @roxanaopr , waiting for @decidim/product 's feedback |
|
@carolromero the change requested has been implemented ... |
|
Thanks, @alecslupu! |
tramuntanal
left a comment
There was a problem hiding this comment.
Good job @roxanaopr!
I've just found some commented code to be removed 😄
Also I'm not sure if decidim-core/app/cells/decidim/author/flag_user.erb should directly render decidim/shared/flag_user_modal (because the flag_user may be rendered more than once in the same screen) but for consistency we should encapsulate it into a author_cell#flag_user_modal method, don't you think? 🤔
decidim-admin/app/controllers/decidim/admin/moderated_users_controller.rb
Outdated
Show resolved
Hide resolved
decidim-admin/app/views/decidim/admin/moderated_users/index.html.erb
Outdated
Show resolved
Hide resolved
decidim-admin/app/views/decidim/admin/moderated_users/index.html.erb
Outdated
Show resolved
Hide resolved
| <%= | ||
| render partial: "decidim/shared/flag_user_modal", locals: { | ||
| reportable: profile_holder, | ||
| form: report_form, | ||
| url: decidim.report_user_path(sgid: profile_holder.to_sgid.to_s) | ||
| } |
There was a problem hiding this comment.
Shouldn't this be rendered by decidim-core/app/cells/decidim/author/flag_user.erb?
There was a problem hiding this comment.
The tricky part is that report_form, that is being initialized in the controller part.
| <%= | ||
| render partial: "decidim/shared/flag_user_modal", locals: { | ||
| reportable: user, | ||
| form: report_form, | ||
| url: decidim.report_user_path(sgid: user.to_sgid.to_s) | ||
| } |
There was a problem hiding this comment.
Shouldn't this be rendered by decidim-core/app/cells/decidim/author/flag_user.erb?
There was a problem hiding this comment.
The tricky part is that report_form, that is being initialized in the controller part.
| <%= | ||
| render partial: "decidim/shared/flag_user_modal", locals: { | ||
| reportable: user, | ||
| form: report_form, | ||
| url: decidim.report_user_path(sgid: user.to_sgid.to_s) | ||
| } |
There was a problem hiding this comment.
Shouldn't this be rendered by decidim-core/app/cells/decidim/author/flag_user.erb?
There was a problem hiding this comment.
The tricky part is that report_form, that is being initialized in the controller part.
There was a problem hiding this comment.
We pass it as a parameter, no?
9621427 to
075bff2
Compare
tramuntanal
left a comment
There was a problem hiding this comment.
Thanks for the refactor @alecslupu @roxanaopr


🎩 What? Why?
Implement a way to report users
Like we have a way to flag a contribution for moderation, a similar mechanism can be implemented to flag users and give moderators the ability to block said user. Everyone can participate in this reporting (admin, moderators, users) and flag users based on their harmful behaviour towards the debate or the content they posted on they public profile (avatar, biography, personal website).
📌 Related Issues
Meta Decidim: https://meta.decidim.org/processes/roadmap/f/122/proposals/15628
Testing
8 Navigate to Participants section, and now the report count should indicate 0
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots
Please add screenshots of the changes you're proposing





