From faee1aa49240c4aa1c25185e9a9f868321a170e0 Mon Sep 17 00:00:00 2001 From: Richard Hallett Date: Mon, 24 Feb 2020 09:50:18 +0100 Subject: [PATCH] authenticate_user! action must return user Called by authenticate_user_with_basic_auth! This requires the user to be returned for further action. Fixes datacite/datacite#973 --- app/controllers/application_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 992713e28..b360c2f92 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -77,6 +77,7 @@ def authenticate_user! @current_user = User.new(credentials, type: type) fail CanCan::AuthorizationNotPerformed if @current_user.errors.present? + @current_user end def current_ability