module ActionPolicy::GraphQL

Constants

VERSION

Attributes

authorize_raise_exception[RW]

Whether to raise an exeption if field is not authorized or return `nil`. Defaults to `true`.

default_authorization_field_prefix[RW]

Which prefix to use for authorization fields Defaults to `“can_”`

default_authorize_rule[RW]

Which rule to use when no specified (e.g. `authorize: true`) Defaults to `:show?`

default_preauthorize_list_rule[RW]

Which rule to use when no specified for preauthorization (e.g. `preauthorize: true`) of a list-like field. Defaults to `:index?`

default_preauthorize_node_rule[RW]

Which rule to use when no specified for preauthorization (e.g. `preauthorize: true`) of a singleton-like field. Defaults to `:show?`

preauthorize_mutation_raise_exception[W]

Whether to raise an exception if preauthorization fails Equals to preauthorize_raise_exception unless explicitly set

preauthorize_raise_exception[W]

Public Class Methods

preauthorize_mutation_raise_exception() click to toggle source
# File lib/action_policy/graphql.rb, line 47
def preauthorize_mutation_raise_exception
  return preauthorize_raise_exception if @preauthorize_mutation_raise_exception.nil?

  @preauthorize_mutation_raise_exception
end
preauthorize_raise_exception() click to toggle source

Whether to raise an exception if preauthorization fails Equals to authorize_raise_exception unless explicitly set

# File lib/action_policy/graphql.rb, line 38
def preauthorize_raise_exception
  return authorize_raise_exception if @preauthorize_raise_exception.nil?
  @preauthorize_raise_exception
end