From ba2679a9659c416c0d8f5cc53db06cf557b1a582 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Wed, 8 Mar 2017 21:39:35 -0800 Subject: [PATCH] fix users/current api if not logged in --- app/controllers/api/v2/users_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/api/v2/users_controller.rb b/app/controllers/api/v2/users_controller.rb index 3f60c410..092a95b5 100644 --- a/app/controllers/api/v2/users_controller.rb +++ b/app/controllers/api/v2/users_controller.rb @@ -3,6 +3,7 @@ module Api module V2 class UsersController < RestfulController def current + raise Pundit::NotAuthorizedError if current_user.nil? @user = current_user authorize @user show # delegate to the normal show function