Add board locking, update tests, and update clean() methods
* 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>
This commit is contained in:
@@ -68,8 +68,6 @@ class ReplyForm(PostForm):
|
||||
|
||||
def clean(self):
|
||||
super().clean()
|
||||
if self.instance.op.lock:
|
||||
raise ValidationError(_("This thread is locked, you cannot reply to it"))
|
||||
capcode = self.cleaned_data["capcode"]
|
||||
if capcode:
|
||||
if not self.user or not self.user.has_perm("board.use_capcode", capcode):
|
||||
|
||||
Reference in New Issue
Block a user