Allow all active users to retrieve list of keep nodes.
[arvados.git] / services / api / app / controllers / arvados / v1 / nodes_controller.rb
index 33c7ea7e240102ffca6cec91cb5c934d4eeb5d7c..f85eceac0e1ed3f9f296714160f04f87513a7361 100644 (file)
@@ -18,12 +18,13 @@ class Arvados::V1::NodesController < ApplicationController
     show
   end
 
-  def index
-    if current_user.andand.is_admin
+  def find_objects_for_index
+    if current_user.andand.is_admin || !current_user.andand.is_active
       super
     else
+      # active non-admin users can list nodes that are (or were
+      # recently) working
       @objects = model_class.where('last_ping_at >= ?', Time.now - 1.hours)
-      render_list
     end
   end
 end