Commit 486f755c authored by Rémy Coutable's avatar Rémy Coutable

Use Ability.allowed? instead of current_user.can? in AccessRequestsFinder

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 5f88aafb
...@@ -22,6 +22,6 @@ class AccessRequestsFinder ...@@ -22,6 +22,6 @@ class AccessRequestsFinder
private private
def can_see_access_requests?(current_user) 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
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment