From e04b54d6fd6e21222620fb87f802cccd2581e6ed Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Tue, 9 Mar 2021 23:31:45 +0100 Subject: [PATCH] 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 --- app/views/my/profile.slim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/my/profile.slim b/app/views/my/profile.slim index 299071e..477808c 100644 --- a/app/views/my/profile.slim +++ b/app/views/my/profile.slim @@ -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'