posts: change safe mode to only allow rating:g posts.
This commit is contained in:
@@ -198,7 +198,7 @@ class PostQuery
|
||||
return [] unless safe_mode?
|
||||
|
||||
tags = Danbooru.config.safe_mode_restricted_tags.map { |tag| -AST.tag(tag) }
|
||||
[AST.metatag("rating", "g,s"), *tags]
|
||||
[AST.metatag("rating", "g"), *tags]
|
||||
end
|
||||
|
||||
# XXX unify with PostSets::Post#show_deleted?
|
||||
|
||||
@@ -1570,7 +1570,7 @@ class Post < ApplicationRecord
|
||||
end
|
||||
|
||||
def safeblocked?
|
||||
CurrentUser.safe_mode? && (rating.in?(["q", "e"]) || Danbooru.config.safe_mode_restricted_tags.any? { |tag| tag.in?(tag_array) })
|
||||
CurrentUser.safe_mode? && (rating != "g" || Danbooru.config.safe_mode_restricted_tags.any? { |tag| tag.in?(tag_array) })
|
||||
end
|
||||
|
||||
def levelblocked?(user = CurrentUser.user)
|
||||
|
||||
Reference in New Issue
Block a user