[ARVADOS] updated: bf8e4d7e7d309dc458b28c4a41a7232b4b172fe8

git at public.curoverse.com git at public.curoverse.com
Thu Jun 26 10:14:45 EDT 2014


Summary of changes:
 apps/workbench/app/models/arvados_api_client.rb | 7 +++++++
 1 file changed, 7 insertions(+)

       via  bf8e4d7e7d309dc458b28c4a41a7232b4b172fe8 (commit)
      from  36270fd64f060da69a8048d2e3ac68945977bcff (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 bf8e4d7e7d309dc458b28c4a41a7232b4b172fe8
Author: radhika <radhika at curoverse.com>
Date:   Thu Jun 26 09:59:16 2014 -0400

    2659: user anonymous token when available and when it is a GET request for an inactive user. Omit this for user agreements and collections.

diff --git a/apps/workbench/app/models/arvados_api_client.rb b/apps/workbench/app/models/arvados_api_client.rb
index 25c54d1..2d12053 100644
--- a/apps/workbench/app/models/arvados_api_client.rb
+++ b/apps/workbench/app/models/arvados_api_client.rb
@@ -70,6 +70,13 @@ class ArvadosApiClient
     else
       query["_method"] = "GET"
     end
+    # Use anonymous token if available when it is a GET request for a resource other than
+    # user agreements and collections (specifically user agreement collections)
+    if (query["_method"] == "GET") && !Thread.current[:user].andand.is_active &&
+        Thread.current[:arvados_anonymous_api_token] &&
+        (url.include?('user_agreements') == false) && (url.include?('collections') == false)
+      query["api_token"] = Thread.current[:arvados_anonymous_api_token]
+    end
     if @@profiling_enabled
       query["_profile"] = "true"
     end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list