New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow reporting of abusive users to moderators or admins #1576
Conversation
…he notification view
…w other minor changes
(cherry picked from commit 99f8a76) Conflicts: app/controllers/issues_controller.rb
(cherry picked from commit 987fcf0)
(cherry picked from commit 156e678)
(cherry picked from commit 3a6550f)
Replace placeholder language with something closer to finalized language (cherry picked from commit 1ef7ea1)
fill_in "report_details", :with => "This comment is spam" | ||
click_on "Create Report" | ||
|
||
assert page.has_content? "Your report has been registered sucessfully" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the string also need to be translated via I18n.t(...) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not in the tests, no - those always run in English. If it's not translated at the point where it is generated then that would be an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, thanks. Then just out of curiosity - why do line 14 and 24 of the test use the internationalisation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect they don't need to, but it won't matter.
@tomhughes please let me know if you'd like any changes to this PR, or if there's anything that I can do to make the review easier. |
I'm currently getting an error 500 trying to log in with "user2" at https://moderation.apis.dev.openstreetmap.org . "user1" oddly seems fine. Is that something that needs to be fixed here or elsewhere? |
I've been through everything again and pushed some changes, which are now live on the test site. Unless anybody spots new problems I plan to merge this soon... |
Is there an API if we want to be able to report abusive users from JOSM? |
No. |
Supersedes PR #1268 , see also issue #841 and this diary entry.
This PR builds on the work by @sbagroy986, @zerebubuth, @woodpeck and @grischard as we try to shepherd this GSoC project through review and into production.
I have cleaned up some aspects of this PR, purely to minimise the distractions when comparing diffs and trying to understand how it works. Please avoid nitpicking the code for now - we need to consider bigger questions first. For the avoidance of doubt, this PR not in a fit state for merging!