Add thread locking and permissions
Mods can lock threads from replying now. Yay! Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -93,8 +93,10 @@ class Post(models.Model):
|
||||
ip = models.GenericIPAddressField()
|
||||
# Capcode
|
||||
capcode = models.ForeignKey("Capcode", null=True, blank=True, on_delete=SET_NULL)
|
||||
# Post is stickied
|
||||
# Post is stickied - it remains at the top of the bump list.
|
||||
sticky = models.BooleanField(default=False, blank=True)
|
||||
# Post is locked - nobody can post in it.
|
||||
lock = models.BooleanField(default=False, blank=True)
|
||||
# Creation time
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
# Last bump time
|
||||
@@ -122,6 +124,7 @@ class Post(models.Model):
|
||||
permissions = [
|
||||
("set_sticky", "Can sticky post"),
|
||||
("set_bump", "Can bumplock post"),
|
||||
("set_lock", "Can lock post"),
|
||||
]
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user