Sha256: 283b7f39416c430967b2d730143d7f1c78f9e179a2eb51a3f5b103b1243f502a

Contents?: true

Size: 416 Bytes

Versions: 29

Compression:

Stored size: 416 Bytes

Contents

module Hyrax
  module DenyAccessOverrideBehavior
    # Overriding the default behavior from Hydra::Core::ControllerBehavior
    def deny_access(exception)
      if current_user&.persisted?
        redirect_to root_path, alert: exception.message
      else
        session['user_return_to'.freeze] = request.url
        redirect_to main_app.new_user_session_path, alert: exception.message
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hyrax-2.9.6 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.9.5 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.9.4 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.9.3 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.9.2 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.9.1 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.9.0 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.8.0 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.7.2 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.7.1 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.7.0 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.6.0 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-3.0.0.pre.rc1 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-3.0.0.pre.beta3 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.5.1 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.5.0 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-3.0.0.pre.beta2 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.4.1 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-3.0.0.pre.beta1 app/controllers/concerns/hyrax/deny_access_override_behavior.rb
hyrax-2.4.0 app/controllers/concerns/hyrax/deny_access_override_behavior.rb