lib/critic/controller.rb in critic-0.2.0 vs lib/critic/controller.rb in critic-0.2.1

- old
+ new

@@ -1,6 +1,7 @@ # frozen_string_literal: true +# Sugar for accessing the authorization interface module Critic::Controller extend ActiveSupport::Concern included do if respond_to?(:hide_action) @@ -31,12 +32,12 @@ authorization_action = action || policy.scope authorize(scope, authorization_action, *args, policy: policy, **options) end - protected - attr_reader :authorization + + protected def authorization_failed! raise Critic::AuthorizationDenied, authorization end