From 3bd07472b294d774111411760f41d7da44ac8482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 12 Jun 2025 16:09:42 +0400 Subject: [PATCH] Fix pages views when signed out --- app/views/pages/privacy.html.erb | 2 +- app/views/pages/tos.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/pages/privacy.html.erb b/app/views/pages/privacy.html.erb index 4096345..8514197 100644 --- a/app/views/pages/privacy.html.erb +++ b/app/views/pages/privacy.html.erb @@ -6,7 +6,7 @@ context: "privacy", key: "body", rich_text: true, default: "No content yet. Please add a privacy policy.") %> - <% if current_user.is_admin? %> + <% if user_signed_in? && current_user.is_admin? %>
<%= render EditContentButtonComponent.new( context: "privacy", key: "body", rich_text: true, diff --git a/app/views/pages/tos.html.erb b/app/views/pages/tos.html.erb index cdeb6a5..e42238a 100644 --- a/app/views/pages/tos.html.erb +++ b/app/views/pages/tos.html.erb @@ -6,7 +6,7 @@ context: "tos", key: "body", rich_text: true, default: "No content yet. Please add your terms of service.") %> - <% if current_user.is_admin? %> + <% if user_signed_in? && current_user.is_admin? %>
<%= render EditContentButtonComponent.new( context: "tos", key: "body", rich_text: true,