This one was kind of a doozy. This also adds a custom 403 error page and
fixes some permission denied behavior that I was having issues with for
a while.
This is also set up in a way that hopefully will allow me to easily
implement user post deletion.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
If a user *really* doesn't like a post, they may try to report it
multiple times. Users may now only report a single post once per IP
address.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
* Boards can be locked from allowing posts - this is can be useful for
things like archived boards or locking down in the event of an
emergency
* Some validation checks for new posts are from the reply/thread form to
the Post model's clean() method
* Add some new tests, I've really been falling behind on those
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Fields are only displayed via the PostModifyForm if the user has
specific permissions to do things, like set stickies.
Also, add PostModifySuccessView that will close the modify window when
the process is complete.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
New threads get a floating window just like new replies have. This only
pops up on the board detail view.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
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>
* 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>
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>
* 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>
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>
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>
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>