From 2fbb6a0e29b9c1d7d41e1aeb60b5783626bd5be9 Mon Sep 17 00:00:00 2001 From: climatebrad Date: Sat, 27 Jul 2024 13:26:22 -0400 Subject: [PATCH] Update read.html.erb - both admin and publisher can edit articles Amend the user.profile check to allow both admin and publisher to see the admintools edit link. --- app/views/articles/read.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/articles/read.html.erb b/app/views/articles/read.html.erb index 8ecab910..aad22ca8 100644 --- a/app/views/articles/read.html.erb +++ b/app/views/articles/read.html.erb @@ -1,5 +1,5 @@
- <% if current_user&.profile == "admin" %> + <% if current_user&.profile.in? [User::ADMIN, User::PUBLISHER] %> <%= link_to(t('.edit'), edit_admin_article_path(@article.id), class: 'admintools', id: 'admin_article') %> <% end %> <% cache @article do %>