Consider using Ability instead of disabling cop
Problem to solve
Sometimes in the code rubocop:disable
is invoked so authorization can be checked by calling current_user.admin?
. In !40871 (comment 409846113) @dzaporozhets suggested out we could instead use something like Ability.allowed?(current_user, :admin_instance)
.
Proposal
Use Ability.allowed?
instead of rubocop:disable Graphql/AuthorizeTypes
.
Edited by Dan Jensen