Show permissions properly

can? :foo, Screenshot only checks if the use can 'foo' any screenshot

can? :foo, Screenshot.new checks for new screenshots not assigned to
them
This commit is contained in:
Christoph Haas 2021-03-09 23:31:45 +01:00
parent c922723a9e
commit e04b54d6fd

View file

@ -23,22 +23,22 @@ p = current_user.screenshots.count
h2 Your permissions
ul
- if can? :approve, Screenshot
- if can? :approve, Screenshot.new
li
=> fa_icon 'thumbs-up'
'approve uploaded screenshots
- if can? :destroy, Screenshot
- if can? :destroy, Screenshot.new
li
=> fa_icon 'trash'
'delete screenshots
- if can? :hide, Screenshot
- if can? :hide, Screenshot.new
li
=> fa_icon 'eye-slash'
'hide screenshots from the public
- if can? :unhide, Screenshot
- if can? :unhide, Screenshot.new
li
=> fa_icon 'eye'
'restore (unhide) screenshots to the public
'restore (unhide) screenshots for the public
- if can? :view, Log
li
=> fa_icon 'book'