lib/authority/configuration.rb in authority-1.1.0 vs lib/authority/configuration.rb in authority-2.0.0

- old
+ new

@@ -1,18 +1,14 @@ module Authority class Configuration # Has default settings, overrideable in the initializer. - attr_accessor :default_strategy, :abilities, :controller_action_map, :user_method, :security_violation_handler, :logger + attr_accessor :abilities, :controller_action_map, :user_method, :security_violation_handler, :logger def initialize - @default_strategy = Proc.new do |able, authorizer, user| - false - end - @abilities = { :create => 'creatable', :read => 'readable', :update => 'updatable', :delete => 'deletable' @@ -31,9 +27,13 @@ @user_method = :current_user @security_violation_handler = :authority_forbidden @logger = Logger.new(STDERR) + end + + def default_strategy=(val) + raise ArgumentError, "`config.default_strategy=` was removed in Authority 2.0; see README and CHANGELOG" end end end