From c97a711e6b254e19dfd0d5ea9643636ee56a3fe2 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 21 Mar 2021 22:31:03 +0100 Subject: [PATCH] Only show Moderate link if permissions allow it --- app/views/my/_menu.slim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/my/_menu.slim b/app/views/my/_menu.slim index 1f47fae..e558d16 100644 --- a/app/views/my/_menu.slim +++ b/app/views/my/_menu.slim @@ -6,9 +6,10 @@ li class=('active' if action_name=='screenshots') = link_to my_screenshots_path = fa_icon 'camera 2x', text: 'Screenshots' - li class=('active' if action_name=='moderate_list') - = link_to moderate_list_path - = fa_icon 'check 2x', text: 'Moderate' + - if can?(:approve, Screenshot) + li class=('active' if action_name=='moderate_list') + = link_to moderate_list_path + = fa_icon 'check 2x', text: 'Moderate' - if can? :view, Log li class=('active' if action_name=='logs') = link_to logs_path