Module: HasHelpers::ServiceTrust::GraphQL::Authorizable

Extended by:
ActiveSupport::Concern
Included in:
Resolvers::Internal::Roles::Base
Defined in:
lib/has_helpers/service_trust/graphql/authorizable.rb

Instance Method Summary collapse

Instance Method Details

#authorized?(*args) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
42
43
44
45
46
# File 'lib/has_helpers/service_trust/graphql/authorizable.rb', line 39

def authorized?(*args)
  return super unless context[:service_trust]

  authorize_service_trust!
  super()
rescue HasHelpers::ServiceTrust::InsufficientCapabilityError => e
  raise ::GraphQL::ExecutionError, e.message
end