summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2016-09-27 15:52:30 +0200
committerRémy Coutable <remy@rymai.me>2016-09-28 08:46:59 +0200
commit486f755c4fc3606df3c6cfc24412a9e7d02d9e36 (patch)
tree5b1266008ef91604a78f0586a6eef3d3b892df4e /app/finders
parent5f88aafbf697d791707938c9732ec2d86723252a (diff)
downloadgitlab-ce-486f755c4fc3606df3c6cfc24412a9e7d02d9e36.tar.gz
Use Ability.allowed? instead of current_user.can? in AccessRequestsFinderrc-new-access-requests-finder
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/access_requests_finder.rb2
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