Module: GraphQR::Authorized

Defined in:
lib/graphqr/authorized.rb

Overview

TODO: add documentation

Instance Method Summary collapse

Instance Method Details

#authorized?(object, context) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
# File 'lib/graphqr/authorized.rb', line 7

def authorized?(object, context)
  policy_provider = context[:policy_provider]

  super && policy_provider.allowed?(action: :show?, record: object)
end