Browse Source

Remove the "slow_reply" permission

The custom user rate-limiting is a better method of doing this type of
thing.
merge-requests/85/head
Deimos 5 years ago
parent
commit
06f0798ed7
  1. 5
      tildes/tildes/models/comment/comment.py

5
tildes/tildes/models/comment/comment.py

@ -189,8 +189,6 @@ class Comment(DatabaseModel):
# reply: # reply:
# - removed comments can't be replied to by anyone # - removed comments can't be replied to by anyone
# - if the topic is locked, only admins can reply # - if the topic is locked, only admins can reply
# - if the user has "comment.reply_slow", they can't reply to comments less
# than 2 hours old
# - otherwise, logged-in users can reply # - otherwise, logged-in users can reply
if self.is_removed: if self.is_removed:
acl.append((Deny, Everyone, "reply")) acl.append((Deny, Everyone, "reply"))
@ -199,9 +197,6 @@ class Comment(DatabaseModel):
acl.append((Allow, "admin", "reply")) acl.append((Allow, "admin", "reply"))
acl.append((Deny, Everyone, "reply")) acl.append((Deny, Everyone, "reply"))
if self.age < timedelta(hours=2):
acl.append((Deny, "comment.reply_slow", "reply"))
acl.append((Allow, Authenticated, "reply")) acl.append((Allow, Authenticated, "reply"))
# edit: # edit:

Loading…
Cancel
Save