From 034cf1198b7122d9701d9aa82e2dae28138683a1 Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 18 Aug 2016 17:56:13 -0500 Subject: [PATCH] Don't show private content (e.g. private notes) to other users when content is shared --- app/views/content/_show.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/content/_show.html.erb b/app/views/content/_show.html.erb index b926d473..4f77211d 100644 --- a/app/views/content/_show.html.erb +++ b/app/views/content/_show.html.erb @@ -20,6 +20,7 @@ <% content.class.attribute_categories.each do |category, data| %>
<% data[:attributes].each do |attribute| %> + <% next if attribute.start_with?("private") && @content.user != current_user %>
<%= attribute.humanize.capitalize %>