[ARVADOS] updated: 89a8208e6f88de78991c654ce001b26519b99f0c

git at public.curoverse.com git at public.curoverse.com
Tue Feb 3 11:43:46 EST 2015


Summary of changes:
 services/api/app/controllers/arvados/v1/users_controller.rb | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

       via  89a8208e6f88de78991c654ce001b26519b99f0c (commit)
      from  e1104f98771283a7659eadf881f006e3a3acb4d5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 89a8208e6f88de78991c654ce001b26519b99f0c
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Feb 3 11:44:51 2015 -0500

    2659: Fix crash in /users/current when not logged in.

diff --git a/services/api/app/controllers/arvados/v1/users_controller.rb b/services/api/app/controllers/arvados/v1/users_controller.rb
index 224dd29..887a5e4 100644
--- a/services/api/app/controllers/arvados/v1/users_controller.rb
+++ b/services/api/app/controllers/arvados/v1/users_controller.rb
@@ -8,9 +8,14 @@ class Arvados::V1::UsersController < ApplicationController
   before_filter :admin_required, only: [:setup, :unsetup]
 
   def current
-    @object = current_user
-    show
+    if current_user
+      @object = current_user
+      show
+    else
+      send_error("Not logged in", status: 401)
+    end
   end
+
   def system
     @object = system_user
     show

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list