11167: Removed conditional that check is keep_web is configured
authorLucas Di Pentima <lucas@curoverse.com>
Mon, 24 Jul 2017 20:52:39 +0000 (17:52 -0300)
committerLucas Di Pentima <lucas@curoverse.com>
Mon, 24 Jul 2017 20:52:39 +0000 (17:52 -0300)
because workbench already do this at start.

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas@curoverse.com>

apps/workbench/app/controllers/collections_controller.rb

index 6dd190ef985c76af2da6b2fed6a6300943ac6696..151b3a5a97f96a05f84db58f115cefdb90574c79 100644 (file)
@@ -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