only show reply form if the user can reply

This commit is contained in:
2026-04-25 23:56:46 +03:00
parent 286a3641eb
commit 612d69c157
5 changed files with 9 additions and 10 deletions

View File

@@ -61,14 +61,14 @@ class Users(Model):
subscriptions.user_id = ?"""
return db.query(q, self.id)
def can_post_to_topic(self, topic):
def can_post_to_thread_or_topic(self, thread_or_topic):
if self.is_guest():
return False
if self.is_mod():
return True
if topic['is_locked']:
if thread_or_topic['is_locked']:
return False
return True