make sure only thread authors and admins can close threads

staging
multiple creatures 2019-08-03 21:57:22 -05:00
parent d69ee097dd
commit 0a646efd48
1 changed files with 1 additions and 0 deletions

View File

@ -376,6 +376,7 @@ class Bangtags
plain.gsub!(/ dot /i, '.')
chunk = plain.scan(/[\w\-]+\.[\w\-]+(?:\.[\w\-]+)*/).uniq.join(' ')
when 'noreplies', 'noats', 'close'
next unless @parent_status.account.id == @account.id || @account.user.admin?
@parent_status.reject_replies = true
@parent_status.save
Rails.cache.delete("statuses/#{@parent_status.id}")