Commit graph

15535 commits

Author SHA1 Message Date
Ben Rog-Wilhelm
adc24ec91e
Add Dev Mode and fix test race conditions. 2022-11-09 21:29:18 -06:00
Ben Rog-Wilhelm
947453869e
Merge pull request #405 from justcool393/remove-more-dramaisms
Remove more dramaisms
2022-11-09 20:51:18 -06:00
Ben Rog-Wilhelm
7c72815dcc
Merge branch 'frost' into remove-more-dramaisms 2022-11-09 20:45:31 -06:00
TLSM
8949b57609 Remove unused ADMINISTRATORS content upload posts.
The ADMINISTRATORS list contained hardcoded post IDs (in the 30000s)
intended to be used for uploading graphical assets onto a production
instance of the site. This functionality is not needed here, and the
special logic to bypass awards when commenting on those posts was
largely removed in 9d4195a89f.
2022-11-09 20:37:04 -06:00
TLSM
3f360bb457 Remove special cases for unused awards.
Removes the following awards / fields on User:
 - flairlock
 - progressivestack
 - bird
 - longpost (pizzashill)
 - marseyawarded
 - rehab
 - deflector
 - mute
 - unmutable
 - eye (All-Seeing Eye)
 - alt (Alt-Seeing Eye)

Primarily motivated by starting to remove some un-Mottelike cruft
from core commenting/posting routes. Cleared out other inapplicable
awards while in the process.
2022-11-09 20:37:04 -06:00
TLSM
9de6f20dea Remove vestigial user ID special cases. 2022-11-09 20:37:04 -06:00
TLSM
010c56a35e Implement #380: remove signatures feature. 2022-11-09 20:37:04 -06:00
TLSM
c85cd469a1 Move post/comment ID boilerplate inside getters.
Borrows code from the upstream which has been working in production
reliably for ~months. Also, most of it was literally copy-pasted,
and the casted ID values aren't used later in the route functions.
2022-11-09 20:37:04 -06:00
justcool393
793273f638 remove beano award (doesn't conflict with @TLSM's commit ☺) 2022-11-07 04:36:41 -06:00
justcool393
37841c9b0f admins are friends not food
paypigs is a bit... lol
2022-11-07 03:56:27 -06:00
justcool393
79b9c08f6c delete marseys route (just 500s) 2022-11-07 03:48:47 -06:00
justcool393
2fabe6d010 remove "meme admin" functionality
(JL1, which doesn't actually have any real use on the site, and their "meme" status is hidden to non-admins anyway)
2022-11-07 03:33:56 -06:00
justcool393
51ef10d7c3 remove vestiges of fart mode 2022-11-07 03:30:31 -06:00
TLSM
1018cf3412 Fix #261: only show lineal parents in contexts. 2022-11-06 03:13:10 -06:00
TLSM
72995ef3f1 Fix #352: don't collapse comments when ?context.
While checking for the key in the Request object is highly inelegant,
it is consistent with how we determine elsewhere if rendered comments
are being shown as a context.
2022-11-06 03:13:10 -06:00
TLSM
9e2ceb28b0 Fix four routes with auth_desired misimplemented.
PR #374 removed `@auth_required` from a number of routes and changed
those which used their `v` parameters to `v=None` and removed the `v`
parameter from those which didn't internally use it. 1841134b47

PR #392 re-added `@auth_desired` to those routes to ensure the
templates rendered with awareness of the current logged-in user
(matters for search, header bar, etc). 9f042c1aeb

However, 500 errors occurred on /random_post, /random_user, /id/<uid>,
and /u/<username>. Those were the four which had their `v` parameter
removed entirely. This has been re-added, which fixes the bug.

The way to understand auth_required vs auth_desired is that they are
nearly identical, with the sole difference than auth_required
checks if v is None and aborts with 401 if so. This means that
auth_desired routes must handle the v=None case. They are the same in
that they always try to give a `v` kwarg to the decorated function,
which was the root cause of those four routes erroring.

Recommended style: the vast majority of routes which return a rendered
template should be auth_desired, because the top-level templates often
draw extensively from `v` state even when the route handler does not.
When a route is either auth_desired or auth_required, it should have a
`v` parameter, which we typically give as the first positional
parameter.
2022-11-06 03:11:59 -06:00
FatherInire
9519e7a744
Use Python 3.11 with Poetry 2022-11-03 09:09:29 -05:00
justcool393
7970b17574 caching: fix CSRF
this removes the ability to do a GET to dump the internal cache but i've added a button to the admin panel that makes it so you can do it
2022-11-02 23:51:33 -05:00
Ben Rog-Wilhelm
387f5e4f62 Fix: Bug introduced with comment security fix 2022-11-02 01:38:43 -05:00
justcool393
7ff138f6f1 modlog: fix 500 when clicking on an action and then clicking on an admin, if that admin doesn't have any admin actions of that specific type 2022-10-30 20:19:09 -05:00
justcool393
0d4662588e
fix bug that could put comments in wrong submissions
this could let users bypass exiles or other checks

see also: Aevann1/rDrama@d61eda8
2022-10-30 20:17:35 -05:00
Inire
08a98429e0 Change hidden score placeholder from ? to empty string 2022-10-28 03:55:07 -05:00
Inire
0991dc7ed2 Fix a bug where voting shows NaN when voting on a post or comment with a '?' score 2022-10-28 03:01:18 -05:00
Ben Rog-Wilhelm
4197aded0e
Support non-logged-in admin contacts. (#377) 2022-10-27 22:16:42 -05:00
electricwhisk
9f042c1aeb
Stay logged in on certain routes (#392)
This commit adds the @auth_desired decorator to
routes that previous had the @auth_required decorator,
but had it removed in #374. This should cause
the user to remain logged in on these routes.
2022-10-27 22:16:22 -05:00
FatherInire
b46ada9f72
Fix some deprecations and factor out a helper function (#387) 2022-10-27 22:15:48 -05:00
Inire
4bdfe28a35 remove .pyc files 2022-10-27 21:54:07 -05:00
Inire
e4cf2f7b52 Support The Motte 2022-10-27 21:54:07 -05:00
Inire
bb34723a81 Support -> Support Us 2022-10-27 21:54:07 -05:00
Ben Rog-Wilhelm
e2162a242f Fix: is no longer needed thanks to WORKDIR 2022-10-27 21:50:50 -05:00
Ben Rog-Wilhelm
2dd31a86a9 Switch dependency management over to Poetry so I can use sensible lockfiles. 2022-10-27 21:50:50 -05:00
Inire
4e2047624b Hide votes for posts and comments under 24 hours old 2022-10-27 21:50:08 -05:00
Ben Rog-Wilhelm
120e299f46 Update CSP to allow Google Analytics. 2022-10-19 06:29:02 -05:00
Ben Rog-Wilhelm
f04c79799e Try copypasting the Google tag again 2022-10-19 05:43:13 -05:00
Ben Rog-Wilhelm
877b572c66 Add Google Analytics (hopefully correctly) 2022-10-15 11:33:28 -05:00
DinoInNameOnly
d354b0713d Allow search and other pages for logged out users 2022-10-14 06:26:08 -05:00
DinoInNameOnly
f36a0b88e2 Add RSS Link 2022-10-07 13:56:23 -05:00
DinoInNameOnly
67a83ba0a8 Allow viewing the popup card 2022-10-07 13:53:37 -05:00
Ben Rog-Wilhelm
e6de172dea Add max-width for posts and comment blocks. 2022-09-27 18:43:48 -05:00
Ben Rog-Wilhelm
bf116115e2 Fix: Reporting comments is broken. 2022-09-27 18:43:20 -05:00
Ben Rog-Wilhelm
9939a382a3 Adjust starting color for colored comment bars 2022-09-26 03:32:51 -05:00
Julian Rota
563f3df7c5 Refactor reasons into a shared template 2022-09-26 03:07:48 -05:00
Julian Rota
0e5bf61d73 Add reasons to report screens 2022-09-26 03:07:48 -05:00
Ben Rog-Wilhelm
8cd6548620 Change bar coloring period to 8 and adjust colors. 2022-09-26 03:06:57 -05:00
Michael House
0bfbf17e45 Implemented collapse bar colorization on the server side 2022-09-23 22:11:55 -05:00
DinoInNameOnly
d62b6e8215 Improve search icon 2022-09-22 01:12:27 -05:00
DinoInNameOnly
39a56b52ea Make entire format buttons clickable 2022-09-22 01:11:03 -05:00
christopher morris
37396d42b5 remove email from admins contact form 2022-09-22 01:09:16 -05:00
Galen Huntington
0889d71647 Fix "view more comments" when not sorting by new. 2022-09-22 00:58:52 -05:00
Ben Rog-Wilhelm
41e5f38d19 Add the Support page. 2022-09-19 06:43:42 -05:00