[openstreetmap-website] Allow reporting of abusive users to moderators or admins (#841)
Tom Hughes
notifications at github.com
Thu Nov 20 20:18:53 UTC 2014
Well the table will need to reference the reported objects. I envisage a `user_reports` tables with columns along the lines of:
```
id
user_id
object_type
object_id
reporter_id
```
Where `user_id` is the ID of the reported user, `object _type` and `object_id` form a polymorphic reference to the reported object (eg `DiaryEntry` and `23` or `DiaryComment` and `456`) and `reporter_id` is the ID of the user making a report.
There would need to be an index on `user_id` so we could find all reports for a user, and a unique index on `reporter_id+object_type+object_id` to make sure users can't report the same object twice.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/841#issuecomment-63872474
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20141120/3ede02a7/attachment.html>
More information about the rails-dev
mailing list