Commit Graph

9 Commits

Author SHA1 Message Date
ab749359fa Add admin capcodes
Sometimes, it is necessary for an admin or other moderator to reveal
themselves. Capcodes allow them to do so by appending a special colored
portion at the end of their name on a post.

This adds object-level permissions, so if you have a moderator who
shouldn't be able to use the "admin" capcode, you can give them
permission only to the "moderator" capcode.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-28 21:37:45 -07:00
a5510d9552 Add board selection to ban creation and post ID to ban model
* Board selection is allowed for when you want to make a global ban
* Post ID is added to ban model for referencing later

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 18:57:23 -07:00
470a10d2a7 Add ability to create bans from reports
This is done in the admin view and opens a new iframed window. The ban
form is pretty barebones and doesn't have full functionality yet, but
that is coming.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-23 16:03:09 -07:00
b4df8b9756 Fix report form to use appropriate templates
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-19 22:41:02 -07:00
6bda7f4f2d Big upheaval of how the reports system works
* There are now Reports and ReportRecords.
* Reports coordinate to what moderators see, and ReportRecords
  coordinate with the reports that are created by individual users.
* Reports keep track of the report reason and the creating user.
* ReportRecords keep track of the total weight and whether this report
  requires urgent attention or not.
* ReportRecord keeps track of its own weight and urgency because then we
  can sort by weight and urgency in the admin view.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-19 22:03:01 -07:00
b838663d50 Add preliminary report system
The report system is pretty low-tech. However the scaffolding is there
for a lot of new stuff. What we currently have:

* Users can create reports
* Staff can view reports
* Admins can create report templates

There's a post drop-down menu available on all posts now, too. This is
where "report post" menu item lives and other things like that can be
added too.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-14 14:56:50 -07:00
6e2c29ae29 Add hcaptcha support and .env file
hcaptcha can be turned on in settings.py with parameters in the .env
file

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 14:51:26 -07:00
bce5e6cdf6 Add sage-like functionality a la 4chan
When reply to a post, you can uncheck "bump" and it will not bump the
thread to the top of the board.

This is useful for the OP, too, because it allows for "permasage"
functionality which is useful for moderators.

Finally, there is also "autosink" functionality. After a per-board
threshhold of posts, a thread will stop bumping.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 13:52:56 -07:00
3a35a35caf Add posting cooldown
If a user tries to post more than once in a certain amount of time, they
will be blocked from doing so until their cooldown is over. This
required a little bit of hacking to get the board and IP address set
*before* the validation checks were made, but it all appears to work.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-05-07 13:24:43 -07:00