[ARVADOS] updated: 238d00d830f909102c15454e4a706faeca45ad0a

git at public.curoverse.com git at public.curoverse.com
Fri Jun 20 17:50:23 EDT 2014


Summary of changes:
 .../app/controllers/application_controller.rb          |  2 +-
 apps/workbench/test/integration/anonymous_user_test.rb | 18 +++++++++++++++++-
 2 files changed, 18 insertions(+), 2 deletions(-)

       via  238d00d830f909102c15454e4a706faeca45ad0a (commit)
       via  cdf3f7df436623fd53ece0cf15aa02bb8c51bed9 (commit)
      from  4466447bc02a0557304c9c41f036ca7cf1fa3763 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 238d00d830f909102c15454e4a706faeca45ad0a
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 20 17:49:53 2014 -0400

    2659: test clicking on Inactive link in topnav

diff --git a/apps/workbench/test/integration/anonymous_user_test.rb b/apps/workbench/test/integration/anonymous_user_test.rb
index d5a9e92..9b9b060 100644
--- a/apps/workbench/test/integration/anonymous_user_test.rb
+++ b/apps/workbench/test/integration/anonymous_user_test.rb
@@ -85,10 +85,24 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
 
     assert page.has_text? 'A Project'
     find('a', text: 'A Project').click
-    page.has_text? ('Test project belonging to active user')
+    assert page.has_text? ('Test project belonging to active user')
 
     #find('tr[data-kind="arvados#pipelineInstance"]', text: 'New pipeline instance').
     #  find('a', text: 'Show').click
+
+    if user && !user['is_active']
+      within('.navbar-fixed-top') do
+        find('a', text: "#{user['email']}").click
+        within('.dropdown-menu') do
+          find('a', text: 'Inactive').click
+        end
+      end
+          
+      if !invited
+        assert page.has_text? 'Your account must be activated'
+      else
+      end
+    end
   end
 
   def verify_homepage_anonymous_login_not_configured user, invited

commit cdf3f7df436623fd53ece0cf15aa02bb8c51bed9
Author: radhika <radhika at curoverse.com>
Date:   Fri Jun 20 17:14:16 2014 -0400

    2659: is_anonymous helper method should also check rails configuration

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index d92d673..43fc0cb 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -932,7 +932,7 @@ class ApplicationController < ActionController::Base
   # helper method to create sharing link for anonymous user user
   helper_method :is_anonymous
   def is_anonymous user
-    return user.uuid == @@anonymous_user.andand.uuid
+    return Rails.configuration.anonymous_user_token && (user.andand.uuid == @@anonymous_user.andand.uuid)
   end
   helper_method :anonymous_login_enabled
   def anonymous_login_enabled
diff --git a/apps/workbench/test/integration/anonymous_user_test.rb b/apps/workbench/test/integration/anonymous_user_test.rb
index bface33..d5a9e92 100644
--- a/apps/workbench/test/integration/anonymous_user_test.rb
+++ b/apps/workbench/test/integration/anonymous_user_test.rb
@@ -142,6 +142,7 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
 
   [
     [nil, nil, false],
+    ['anonymous', api_fixture('users')['anonymous'], false],
     ['inactive', api_fixture('users')['inactive'], true],
     ['inactive_uninvited', api_fixture('users')['inactive_uninvited'], false],
     ['active', api_fixture('users')['active'], true]
@@ -160,6 +161,7 @@ class AnonymousUserTest < ActionDispatch::IntegrationTest
 
   [
     [nil, nil, false],
+    ['anonymous', api_fixture('users')['anonymous'], false],
     ['inactive', api_fixture('users')['inactive'], true],
     ['inactive_uninvited', api_fixture('users')['inactive_uninvited'], false],
     ['active', api_fixture('users')['active'], true]

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list