liberapay.com icon indicating copy to clipboard operation
liberapay.com copied to clipboard

Add a report user button

Open MartinDelille opened this issue 5 years ago • 13 comments

This is a work in progress. Feel free to comment the choice I made in the UI.

It aims to fix #353

MartinDelille avatar Aug 20 '18 07:08 MartinDelille

Do you mean "report" a user?

Need to add documentation for users as well.

mattbk avatar Aug 20 '18 12:08 mattbk

The wording is "report" not signal as @mattbk mentioned, signal doesn't really make sense as people know what reporting is.

Also, spelling/grammar issues:

What happen when I signal a user

Should be "What happens when I report a user?"

The profil will be review by the moderator.

Should be "The profile will be reviewed by a moderator."

LiamDawe avatar Aug 20 '18 21:08 LiamDawe

I performed the requested change but the button still doesn't do anything for now.

Need to add documentation for users as well.

@mattbk What do you mean by that? I put a little FAQ below the report form.

MartinDelille avatar Aug 21 '18 07:08 MartinDelille

I think a link to more detail is needed. Who are the moderators, what powers do they have, what's the process, etc.

mattbk avatar Aug 21 '18 13:08 mattbk

@mattbk I updated the FAQ accordingly to the proposition made there: https://github.com/liberapay/liberapay.org/issues/15#issuecomment-414093827

MartinDelille avatar Aug 22 '18 12:08 MartinDelille

How can I go further with this?

I would say we should add a kind of role attribute to a user to differenciate a regular user from a moderator.

Then a simple email or notification would be sent to the 10 moderators that would be triggered everytime a user click the report button.

MartinDelille avatar Sep 01 '18 11:09 MartinDelille

@Changaco Any thought about this?

MartinDelille avatar Sep 01 '18 11:09 MartinDelille

Away from computer right now, but admins in Gratipay before this was forked were distinguished by a column in the participant table called is_admin. Then testing whether a user was an admin was possible by querying the current user.

A similar system could be set up for mods if this is still true in Liberapay.

mattbk avatar Sep 01 '18 13:09 mattbk

Then you would need a voting mechanism for reports and to record who voted what or a simple count.

Additional feature would be discussion of reports on top of voting.

But for a quicker release, quarantining a suspicious user could be done manually by an admin.

mattbk avatar Sep 01 '18 13:09 mattbk

Your right: just notifying the admin would be a minimum.

I recently report a facebook page and they have a pretty way to handle it: When the moderator have examined the suspicious page, a report is sent to the user (but like you say, this would be additional features).

MartinDelille avatar Sep 01 '18 14:09 MartinDelille

I replaced the is_admin column with a more generic privileges column 2 years ago in 63900b45385bfb62be105c324cc53d45154e3c57. I have a local branch to add a new moderate privilege, but it's not ready yet.

Changaco avatar Sep 03 '18 09:09 Changaco

@Changaco Awesome! I guess the unknown part I have to do when the button clicked is something like:

warning = "The following account has been reported:" + reportedAccount

foreach user in users where user.privileges & moderate != 0
    notifications.sent(user, warning)

Any code example I could go from to:

  • do the moderator user request
  • send the notification

MartinDelille avatar Sep 04 '18 08:09 MartinDelille

Would anything from liberapay.com/tests/py/test_notifications.py help you out?

Should probably add a test there anyway.

mattbk avatar Sep 04 '18 14:09 mattbk