diff --git a/app/finders/access_requests_finder.rb b/app/finders/access_requests_finder.rb index 79b0ba39e2cf41027bb74b1095cb49f3d5b4993e..b6ee49df99b97d66296603a4b7c64efb4bfa8844 100644 --- a/app/finders/access_requests_finder.rb +++ b/app/finders/access_requests_finder.rb @@ -22,6 +22,6 @@ class AccessRequestsFinder private def can_see_access_requests?(current_user) - source && current_user && current_user.can?(:"admin_#{source.class.to_s.underscore}", source) + source && Ability.allowed?(current_user, :"admin_#{source.class.to_s.underscore}", source) end end