Merge pull request #5301 from nonamethanks/allow-users-to-see-own-uploads

Posts: show levelblocked posts to their uploader
This commit is contained in:
evazion
2022-10-21 01:02:23 -05:00
committed by GitHub

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)