From 5af74830f32c664c514b9fdfb56faa52eea6392c Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Mon, 6 Apr 2020 17:34:08 -0500 Subject: [PATCH] only let users favorite their own pages --- app/views/content/display/_favorite_control.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/content/display/_favorite_control.html.erb b/app/views/content/display/_favorite_control.html.erb index 1cf6be85..d7c727b3 100644 --- a/app/views/content/display/_favorite_control.html.erb +++ b/app/views/content/display/_favorite_control.html.erb @@ -8,7 +8,7 @@ end %> -<% if content.persisted? %> +<% if content.persisted? && user_signed_in? && content.user == current_user %>