Browse Source

Prevent replying to self in locked topics

I think it's time to refactor the ACL methods.
merge-requests/25/head
Deimos 6 years ago
parent
commit
3fed4783f7
  1. 1
      tildes/tildes/models/comment/comment.py

1
tildes/tildes/models/comment/comment.py

@ -170,6 +170,7 @@ class Comment(DatabaseModel):
acl.append((Allow, 'admin', 'view'))
acl.append((Allow, self.user_id, 'view'))
if not self.topic.is_locked:
acl.append((Allow, self.user_id, 'reply'))
acl.append((Allow, self.user_id, 'edit'))
acl.append((Allow, self.user_id, 'delete'))

Loading…
Cancel
Save