From 45bbb71ebad4d050dfaa1b5192460e708bf0aefb Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 13 Jul 2020 18:15:55 -0500 Subject: [PATCH] posts: hide ids of restricted posts. --- app/policies/post_policy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/policies/post_policy.rb b/app/policies/post_policy.rb index fa94e340a..3e347776c 100644 --- a/app/policies/post_policy.rb +++ b/app/policies/post_policy.rb @@ -91,7 +91,7 @@ class PostPolicy < ApplicationPolicy attributes += [:has_large, :has_visible_children, :is_favorited?] attributes += TagCategory.categories.map {|x| "tag_string_#{x}".to_sym} attributes += [:file_url, :large_file_url, :preview_file_url] if visible? - attributes -= [:md5, :file_ext] if !visible? + attributes -= [:id, :md5, :file_ext] if !visible? attributes -= [:fav_string] if !user.is_moderator? attributes end