lib/authority.rb in authority-2.5.0 vs lib/authority.rb in authority-2.6.0

- old
+ new

@@ -1,9 +1,10 @@ require 'active_support/concern' require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/hash/keys' require 'active_support/core_ext/string/inflections' +require 'active_support/rescuable' require 'forwardable' require 'logger' require 'authority/security_violation' module Authority @@ -31,10 +32,10 @@ # @param [Hash] options, arbitrary options hash to delegate to the authorizer # @raise [SecurityViolation] if user is not allowed to perform action on resource # @return [Model] resource instance def self.enforce(action, resource, user, options = {}) unless action_authorized?(action, resource, user, options) - raise SecurityViolation.new(user, action, resource) + raise SecurityViolation.new(user, action, resource) end resource end def self.action_authorized?(action, resource, user, options = {})