[ARVADOS] created: 25e646a708d1d91aebcf8db80b8ae1fafa044034

git at public.curoverse.com git at public.curoverse.com
Thu Jul 16 15:07:26 EDT 2015


        at  25e646a708d1d91aebcf8db80b8ae1fafa044034 (commit)


commit 25e646a708d1d91aebcf8db80b8ae1fafa044034
Author: Manoj <jonam33 at gmail.com>
Date:   Thu Jul 16 15:01:05 2015 -0400

    6604- Disabled SSH public key notification when shell_in_a_box_url
    is configured.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index db00be3..db3d430 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -707,6 +707,7 @@ class ApplicationController < ActionController::Base
   @@notification_tests = []
 
   @@notification_tests.push lambda { |controller, current_user|
+    return nil if Rails.configuration.shell_in_a_box_url
     AuthorizedKey.limit(1).where(authorized_user_uuid: current_user.uuid).each do
       return nil
     end
diff --git a/apps/workbench/test/integration/application_layout_test.rb b/apps/workbench/test/integration/application_layout_test.rb
index daf2b09..3a8717f 100644
--- a/apps/workbench/test/integration/application_layout_test.rb
+++ b/apps/workbench/test/integration/application_layout_test.rb
@@ -201,4 +201,12 @@ class ApplicationLayoutTest < ActionDispatch::IntegrationTest
       assert page.has_link?('Report a problem ...'), 'No link - Report a problem'
     end
   end
+
+  test "no SSH public key notification when shell_in_a_box_url is configured" do
+    Rails.configuration.shell_in_a_box_url = 'example.com'
+    visit page_with_token('job_reader')
+    click_link 'notifications-menu'
+    assert page.has_no_link?('Click here to set up an SSH public key for use with Arvados.')
+    assert page.has_link?('Click here to learn how to run an Arvados Crunch pipeline')
+  end
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list