forked from e621ng/e621ng
Prevent viewing deleted or banned posts
This fixes an exploit where you can view deleted and banned posts through the atom service regardless of user level.
This commit is contained in:
parent
cf5e8365f7
commit
2ec0fed659
@ -462,7 +462,8 @@ module Danbooru
|
||||
end
|
||||
|
||||
def can_user_see_post?(user, post)
|
||||
if is_user_restricted?(user) && is_post_restricted?(post)
|
||||
return false if (post.is_deleted? || post.is_banned?) && !user.is_moderator?
|
||||
if is_user_restricted?(user) && is_post_restricted?(post)
|
||||
false
|
||||
else
|
||||
true
|
||||
|
Loading…
Reference in New Issue
Block a user