posts: restrict banned paid rewards for non-approvers.

This commit is contained in:
evazion
2020-07-06 13:51:07 -05:00
parent 0c7d48d890
commit 40a114c99c
2 changed files with 20 additions and 1 deletions

View File

@@ -1474,7 +1474,8 @@ class Post < ApplicationRecord
end
def banblocked?(user = CurrentUser.user)
is_banned? && !user.is_gold?
return false unless is_banned?
(has_tag?("paid_reward") && !user.is_approver?) || !user.is_gold?
end
def visible?(user = CurrentUser.user)