Posts: show levelblocked posts to their uploader

This commit is contained in:
nonamethanks
2022-10-19 18:07:43 +02:00
parent 412b7f2727
commit 57dc0cbeca

View File

@@ -1584,7 +1584,7 @@ class Post < ApplicationRecord
def levelblocked?(user = CurrentUser.user)
#!user.is_gold? && RESTRICTED_TAGS.any? { |tag| has_tag?(tag) }
!user.is_gold? && tag_string.match?(RESTRICTED_TAGS_REGEX)
user != uploader && !user.is_gold? && tag_string.match?(RESTRICTED_TAGS_REGEX)
end
def banblocked?(user = CurrentUser.user)