X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/acedca207179925286810dd9c2ad7934ce5bfe69..f99ffd6844ae9b88cfd17c8fe6e9fcc85a55d79c:/services/api/app/controllers/application_controller.rb diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb index 9878547f30..dfe6153090 100644 --- a/services/api/app/controllers/application_controller.rb +++ b/services/api/app/controllers/application_controller.rb @@ -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 @@ -69,7 +69,7 @@ class ApplicationController < ActionController::Base :with => :render_not_found rescue_from ActionController::UnknownController, :with => :render_not_found - rescue_from ActionController::UnknownAction, + rescue_from AbstractController::ActionNotFound, :with => :render_not_found rescue_from ArvadosModel::PermissionDeniedError, :with => :render_error @@ -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 @@ -354,4 +354,9 @@ class ApplicationController < ActionController::Base order: { type: 'string', required: false } } end + + def client_accepts_plain_text_stream + (request.headers['Accept'].split(' ') & + ['text/plain', '*/*']).count > 0 + end end