vincent-peugnet / antilope

Antilope private tracker for IRL sharing, allowing members to share anything inside communities.
https://antilope-alpha.club1.fr/
GNU Affero General Public License v3.0
9 stars 2 forks source link

reports #11

Open vincent-peugnet opened 3 years ago

vincent-peugnet commented 3 years ago

Report are made to avoid abuse and try to keep a minimum security layer using user self moderation and dedicated moderators.

add the ability to report sharables and interested users to users. (interested users are users that have clicked on interested button on a sharable

This could be an UserClass propriety defining who can or not report. But keep in mind that it's a security tool, so this should not be reserved to only high user classes.

There should be different types of reports adressing to differents users types :

vincent-peugnet commented 3 years ago

Managers should be able to report a validation they find strange or abusive. Especially if they have checked the responsive checkbox. For example, you're sharing a guitar lesson, an user validate you, but you've never seen her or him... straaannge...

vincent-peugnet commented 2 years ago

Things that can be reported:

there could be a parent class report

class Report

id        int
rule      rule_id (int)
comment   text
creation  dateTime
user      user_id (int)

And child classes like ReportSharable

class ReportSharable extends Report

sharable   int
vincent-peugnet commented 2 years ago

Mmmhh, I'm thinking again of how should Reports be stored.

I wanted to to a ReportReport entity allowing moderators to report a report :smile:

But these would need to allow report ReportSharable, ReportInterest, ReportUserProfile.... etc... so I should create a ReportReportSharable !!! That's horrible.

So I'm wondering if, from the begining, I could have done things differently by using a lot of columns that won't be used at the same time.

class Report V2

id         int
rule       rule_id (int)
comment    text
creation   dateTime
user       user_id (int)

sharable   sharable_id (default: NULL)
interest   interest_id (default: NULL)
validation validation_id (default: NULL)

I can manage to only allow one of thoose parameter to be filled. But of course that would create many empty columns.

But I like the idea of each report sharing the same ID count.

vincent-peugnet commented 2 years ago

As said @n-peugnet , it correspond to problems resolved by Doctrine Inheritance.

Maybe the easiest way could be to use the single table inheritance strategy.