comses / comses.net

comses.net wagtail site
https://www.comses.net
GNU General Public License v3.0
17 stars 16 forks source link

basic spam detection #719

Closed sgfost closed 4 months ago

sgfost commented 4 months ago

uses two methods:

logs actions to a SpamModeration model with a generic fk to content models. actions such as deactivating the user or allowing the post can then be taken via a WIP admin view

TODO:

resolves comses/planning#235

sgfost commented 4 months ago

spam content, and deleted events/jobs for that matter, still show up in the site-wide search. Need to find a good way to filter those from the general search but struggling to figure out how it currently does this for non-live codebases..

alee commented 4 months ago

spam content, and deleted events/jobs for that matter, still show up in the site-wide search. Need to find a good way to filter those from the general search but struggling to figure out how it currently does this for non-live codebases..

good catch, we should have a

@classmethod
get_indexed_objects(cls)

defined for Events, MemberProfiles, Jobs

sgfost commented 4 months ago

ah that's it, thanks

The bulk of this is done, just need to put up a few tests. I think it ought to work as a more flexible base for using the work in #693 as another detection method, but lmk if you have any thoughts or concerns when you get around to it

sgfost commented 4 months ago

Thx, I'll make a new issue with these needed changes as to not block merging if its in a 'good enough' state