Only show Moderate link if permissions allow it

This commit is contained in:
Christoph Haas 2021-03-21 22:31:03 +01:00
parent 006a85a8a5
commit c97a711e6b

View file

@ -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