[ARVADOS] updated: 871a7250874ec52543bed51c8b6d14a3ab860eb8

git at public.curoverse.com git at public.curoverse.com
Wed May 7 09:57:36 EDT 2014


Summary of changes:
 .../app/controllers/collections_controller.rb      |    4 ++--
 .../app/views/collections/_sharing_popup.html.erb  |    2 +-
 .../app/views/collections/_show_files.html.erb     |   11 +++--------
 .../app/views/collections/sharing_popup.js.erb     |    1 +
 4 files changed, 7 insertions(+), 11 deletions(-)

       via  871a7250874ec52543bed51c8b6d14a3ab860eb8 (commit)
      from  c3fd48d0728c140fbe0ab038ad148cfae8104c97 (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 871a7250874ec52543bed51c8b6d14a3ab860eb8
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed May 7 09:57:33 2014 -0400

    Fixed incorrectly created scopes.  Fixed link to use reader_tokens[] instead of
    api_token.  Fixed to update color/text of sharing button on files page.

diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index a9cc1c6..509b9f4 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -111,7 +111,7 @@ class CollectionsController < ApplicationController
   end
 
   def search_scopes
-    ApiClientAuthorization.where(filters: [['scopes', '=', "/arvados/v1/collections/#{@object.uuid}"]])
+    ApiClientAuthorization.where(filters: [['scopes', '=', ["GET /arvados/v1/collections/#{@object.uuid}", "GET /arvados/v1/collections/#{@object.uuid}/"]]])
   end
 
   def show
@@ -185,7 +185,7 @@ class CollectionsController < ApplicationController
   end
 
   def share
-    a = ApiClientAuthorization.create(scopes: ["/arvados/v1/collections/#{@object.uuid}"])
+    a = ApiClientAuthorization.create(scopes: ["GET /arvados/v1/collections/#{@object.uuid}", "GET /arvados/v1/collections/#{@object.uuid}/"])
     @search_sharing = search_scopes.select { |s| s.scopes != ['all'] }
     render 'sharing_popup'
   end
diff --git a/apps/workbench/app/views/collections/_sharing_popup.html.erb b/apps/workbench/app/views/collections/_sharing_popup.html.erb
index b88cd58..97bcdd1 100644
--- a/apps/workbench/app/views/collections/_sharing_popup.html.erb
+++ b/apps/workbench/app/views/collections/_sharing_popup.html.erb
@@ -10,7 +10,7 @@
         <% if @search_sharing.any? %>
           Use this link to share this collection:<br>
           <big>
-          <% link = collection_url + "?api_token=#{@search_sharing.first.api_token}" %>
+          <% link = collection_url + "?reader_tokens[]=#{@search_sharing.first.api_token}" %>
           <%= link_to link, link %>
           </big>
         <% else %>
diff --git a/apps/workbench/app/views/collections/_show_files.html.erb b/apps/workbench/app/views/collections/_show_files.html.erb
index 885d42f..28c3396 100644
--- a/apps/workbench/app/views/collections/_show_files.html.erb
+++ b/apps/workbench/app/views/collections/_show_files.html.erb
@@ -10,14 +10,9 @@
   <div class="col-md-6"></div>
   <div class="col-md-6">
     <div class="pull-right">
-      <% if @search_sharing.any? %>
-        <% linktext = "Shared" %>
-        <% btnstyle = "btn-success" %>
-      <% else %>
-        <% linktext = "Share" %>
-        <% btnstyle = "btn-info" %>
-      <% end %>
-      <%= link_to linktext, sharing_popup_collection_url(id: @object.uuid),  {class: "btn #{btnstyle}", :remote => true, 'data-toggle' =>  "modal", 'data-target' => '#collection-sharing-modal-window'}  %>
+      <span id="sharing-button">
+        <%= render partial: 'sharing_button' %>
+      </span>
       <span style="padding-left: 1em">Collection storage status:</span>
       <%= render partial: 'toggle_persist', locals: { uuid: @object.uuid, current_state: (@is_persistent ? 'persistent' : 'cache') } %>
 
diff --git a/apps/workbench/app/views/collections/sharing_popup.js.erb b/apps/workbench/app/views/collections/sharing_popup.js.erb
index fea8593..933f08d 100644
--- a/apps/workbench/app/views/collections/sharing_popup.js.erb
+++ b/apps/workbench/app/views/collections/sharing_popup.js.erb
@@ -1 +1,2 @@
 $("#collection-sharing-modal-window").html("<%= escape_javascript(render partial: 'sharing_popup') %>");
+$("#sharing-button").html("<%= escape_javascript(render partial: 'sharing_button') %>");

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list