From 1dd3f0e144b5102128f18974f48f620aaf7b78b3 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Mon, 24 Jul 2017 17:52:39 -0300 Subject: [PATCH] 11167: Removed conditional that check is keep_web is configured because workbench already do this at start. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- .../app/controllers/collections_controller.rb | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb index 6dd190ef98..151b3a5a97 100644 --- a/apps/workbench/app/controllers/collections_controller.rb +++ b/apps/workbench/app/controllers/collections_controller.rb @@ -141,23 +141,18 @@ class CollectionsController < ApplicationController return end - # If we are configured to use a keep-web server, just redirect to - # the appropriate URL. - if Rails.configuration.keep_web_url or - Rails.configuration.keep_web_download_url - opts = {} - if usable_token == params[:reader_token] - opts[:path_token] = usable_token - elsif usable_token == Rails.configuration.anonymous_user_token - # Don't pass a token at all - else - # We pass the current user's real token only if it's necessary - # to read the collection. - opts[:query_token] = usable_token - end - opts[:disposition] = params[:disposition] if params[:disposition] - return redirect_to keep_web_url(params[:uuid], params[:file], opts) + opts = {} + if usable_token == params[:reader_token] + opts[:path_token] = usable_token + elsif usable_token == Rails.configuration.anonymous_user_token + # Don't pass a token at all + else + # We pass the current user's real token only if it's necessary + # to read the collection. + opts[:query_token] = usable_token end + opts[:disposition] = params[:disposition] if params[:disposition] + return redirect_to keep_web_url(params[:uuid], params[:file], opts) end def sharing_scopes -- 2.30.2