posts: unredact file_ext field on hidden posts.

This commit is contained in:
evazion
2021-09-12 04:27:49 -05:00
parent 9bee9223ac
commit 1bb7c50858

View File

@@ -95,7 +95,7 @@ class PostPolicy < ApplicationPolicy
attributes += [:has_large, :has_visible_children]
attributes += TagCategory.categories.map {|x| "tag_string_#{x}".to_sym}
attributes += [:file_url, :large_file_url, :preview_file_url] if visible?
attributes -= [:id, :md5, :file_ext] if !visible?
attributes -= [:id, :md5] if !visible?
attributes -= [:fav_string]
attributes
end