Commit Graph

5 Commits

Author SHA1 Message Date
a4f00e6242 Add user post deletion
Users can delete their posts as long as they don't clear their cookies,
and as long as server-side user sessions are persistent.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-07-13 21:28:07 -07:00
356196db26 Fix small bug with ban calculation
If a user had a permaban, there would be a comparison error between the
current time and the expiration time (none).

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-26 20:27:42 -07:00
8ab760d456 Fix small type annotation bug
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-24 16:53:01 -07:00
a3bf5098ba Rename CreatePostView -> CreateView, add utils.is_banned
The artist formerly known as CreatePostView is a little more generic now
and outsources its ban check to a new util method, is_banned.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-24 16:50:46 -07:00
28ccd7d73b Add IP bans
Users can be banned by IP address now, either by singular IP or in an IP
range. If they are banned and attempt to post, they will be met with a
"you are banned until X date" screen.

There are a few loose threads with this, and IP bans may be obsolete if
I decide to go the accounts-required-for-posting route. But I think this
is a good start for 4chan style posting.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2022-06-20 15:26:35 -07:00