Use Ability.allowed? instead of current_user.can? in AccessRequestsFinder
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
5f88aafbf6
commit
486f755c4f
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue