app/controllers/concerns/sufia/depositors_controller_behavior.rb in sufia-7.1.0 vs app/controllers/concerns/sufia/depositors_controller_behavior.rb in sufia-7.2.0
- old
+ new
@@ -1,21 +1,12 @@
module Sufia
module DepositorsControllerBehavior
extend ActiveSupport::Concern
+ include DenyAccessOverrideBehavior
included do
before_action :authenticate_user!
before_action :validate_users, only: :create
- end
-
- # Overriding the default behavior from Hydra::Core::ContorllerBehavior
- def deny_access(exception)
- if current_user && current_user.persisted?
- redirect_to root_path, alert: exception.message
- else
- session['user_return_to'.freeze] = request.url
- redirect_to new_user_session_path, alert: exception.message
- end
end
def create
grantor = authorize_and_return_grantor
grantee = ::User.from_url_component(params[:grantee_id])