only show reply form if the user can reply
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user