From 0e807054379b8fd5a2ada6c839bee5dbf7edb1a0 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 8 Mar 2019 21:47:03 +0800 Subject: [PATCH] added authorization --- app/views/admin/universal_tables/show.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/admin/universal_tables/show.html.erb b/app/views/admin/universal_tables/show.html.erb index 72fbfdc..868bd46 100644 --- a/app/views/admin/universal_tables/show.html.erb +++ b/app/views/admin/universal_tables/show.html.erb @@ -27,6 +27,7 @@ + <% can_edit = can_edit_or_delete?(@entries.first.u_table) %> <% @entries.each do |entry| %> <% @columns.each_with_index do |column, index| %> @@ -51,7 +52,7 @@ <%= format_date(ce.period_from, column.date_format) %> ~ <%= format_date(ce.period_to, column.date_format) %> <% end %> <% end %> - <% if index == 0 %> + <% if index == 0 && can_edit %>