Authorisation management using CanCanCan added

This commit is contained in:
Christoph Haas 2021-02-28 21:36:46 +01:00
parent 51be4a4777
commit 7a3b65fe50
24 changed files with 211 additions and 295 deletions

View file

@ -7,11 +7,11 @@
= link_to moderate_list_path
= fa_icon 'check 2x', text: 'Moderate'
// Add link if user has uploaded screenshots
- if @current_users_screenshots and @current_users_screenshots.any?
li class=('active' if controller_name=='my' and action_name=='uploads')
= link_to my_uploads_path
= fa_icon 'image 2x', text: 'My uploads'
' My uploads
/ - if @current_users_screenshots and @current_users_screenshots.any?
/ li class=('active' if controller_name=='my' and action_name=='uploads')
/ = link_to my_uploads_path
/ = fa_icon 'image 2x', text: 'My uploads'
/ ' My uploads
li
= link_to destroy_user_session_path, method: :delete