Skip to content

Commit

Permalink
authenticate_user! action must return user
Browse files Browse the repository at this point in the history
Called by authenticate_user_with_basic_auth!
This requires the user to be returned for further action.

Fixes datacite/datacite#973
  • Loading branch information
richardhallett committed Feb 24, 2020
1 parent fc4f332 commit faee1aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit faee1aa

Please sign in to comment.