Sha256: a319a9964f3ea33c1b4bea336c51f719596a320befdad58d4be12752dcc3428f
Contents?: true
Size: 1.37 KB
Versions: 1
Compression:
Stored size: 1.37 KB
Contents
require "active_support" require "active_model" require "heimdallr/version" require "heimdallr/proxy/collection" require "heimdallr/proxy/record" require "heimdallr/validator" require "heimdallr/evaluator" require "heimdallr/model" require "heimdallr/resource" # See {file:README.yard}. module Heimdallr class << self # Allow implicit insecure association access. Consider this code: # # class User < ActiveRecord::Base # include Heimdallr::Model # # has_many :articles # end # # class Article < ActiveRecord::Base # # No Heimdallr::Model! # end # # If the +allow_insecure_associations+ setting is +false+ (the default), # then +user.restrict(context).articles+ fetch would cause an # {InsecureOperationError}. This may be undesirable in some environments; # setting +allow_insecure_associations+ to +true+ will prevent the error # from being raised. # # @return [Boolean] attr_accessor :allow_insecure_associations self.allow_insecure_associations = false end # {PermissionError} is raised when a security policy prevents # a called operation from being executed. class PermissionError < StandardError; end # {InsecureOperationError} is raised when a potentially unsafe # operation is about to be executed. class InsecureOperationError < StandardError; end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
heimdallr-0.0.2 | lib/heimdallr.rb |