Class: GraphqlAuthorize::AuthAdapters::Pundit

Inherits:
Base
  • Object
show all
Defined in:
lib/graphql_authorize/auth_adapters/pundit.rb

Instance Attribute Summary

Attributes inherited from Base

#context, #field_definition

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from GraphqlAuthorize::AuthAdapters::Base

Instance Method Details

#authorizeObject



6
7
8
9
10
11
12
# File 'lib/graphql_authorize/auth_adapters/pundit.rb', line 6

def authorize
  if policy&.respond_to?(pundit_action)
    policy.send(pundit_action)
  else
    false
  end
end