diff options
author | Rémy Coutable <remy@rymai.me> | 2016-09-27 16:52:30 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-09-28 09:46:59 +0300 |
commit | 486f755c4fc3606df3c6cfc24412a9e7d02d9e36 (patch) | |
tree | 5b1266008ef91604a78f0586a6eef3d3b892df4e /app/finders/access_requests_finder.rb | |
parent | 5f88aafbf697d791707938c9732ec2d86723252a (diff) |
Use Ability.allowed? instead of current_user.can? in AccessRequestsFinder
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/finders/access_requests_finder.rb')
-rw-r--r-- | app/finders/access_requests_finder.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/access_requests_finder.rb b/app/finders/access_requests_finder.rb index 79b0ba39e2c..b6ee49df99b 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 |