Use current_user to select API response template. fixes #1594
[arvados.git] / services / api / app / controllers / application_controller.rb
index 9878547f30002fd7d319e3e40fb787b5228918bf..2f07c394609a7664abec7a88630fd48c6b308c83 100644 (file)
@@ -24,7 +24,7 @@ class ApplicationController < ActionController::Base
 
   def show
     if @object
-      render json: @object.as_api_response(:superuser)
+      render json: @object.as_api_response
     else
       render_not_found("object not found")
     end
@@ -332,7 +332,7 @@ class ApplicationController < ActionController::Base
       :self_link => "",
       :next_page_token => "",
       :next_link => "",
-      :items => @objects.as_api_response(:superuser)
+      :items => @objects.as_api_response(nil)
     }
     render json: @object_list
   end