From f154c1838cdc73ee156447392296019003ccdebc Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Sun, 28 Feb 2021 22:42:28 +0100 Subject: [PATCH] Add ability to view approved screenshots for anonymous users --- app/models/ability.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/ability.rb b/app/models/ability.rb index c2ef366..73b514a 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -51,6 +51,8 @@ class Ability # Allow to view any own uploads (even not-yet-approved) can :view, Screenshot, user_id: user.id end + else # Nobody logged in + can :view, Screenshot, approved: true end end end