[arvados] created: 2.1.0-2596-gd104886f9

git repository hosting git at public.arvados.org
Thu Jun 9 12:20:00 UTC 2022


        at  d104886f95ab9bf0712873c809410b34f8bed031 (commit)


commit d104886f95ab9bf0712873c809410b34f8bed031
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Jun 8 15:54:26 2022 -0300

    19177: Fixes tests.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/apps/workbench/test/integration/collections_test.rb b/apps/workbench/test/integration/collections_test.rb
index 1edfc1050..4d6489d4a 100644
--- a/apps/workbench/test/integration/collections_test.rb
+++ b/apps/workbench/test/integration/collections_test.rb
@@ -45,7 +45,7 @@ class CollectionsTest < ActionDispatch::IntegrationTest
     Rails.configuration.Workbench.DisableSharingURLsUI = true
     coll_uuid = api_fixture("collections", "collection_owned_by_active", "uuid")
     visit page_with_token("active_trustedclient", "/collections/#{coll_uuid}")
-    assert_no_selector 'input', text: 'Create sharing link'
+    assert_no_selector 'div#sharing-button'
   end
 
   test "creating and uncreating a sharing link" do
@@ -53,7 +53,7 @@ class CollectionsTest < ActionDispatch::IntegrationTest
     download_link_re =
       Regexp.new(Regexp.escape("/c=#{coll_uuid}/"))
     visit page_with_token("active_trustedclient", "/collections/#{coll_uuid}")
-    assert_selector 'input', text: 'Create sharing link'
+    assert_selector 'div#sharing-button'
     within "#sharing-button" do
       check_sharing(:on, download_link_re)
       check_sharing(:off, download_link_re)

commit 2ed8d670a5d6f93eed57cb14138323cc835e027f
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Jun 8 10:21:52 2022 -0300

    19177: Adds test to wb1 for sharing link button hideability.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/apps/workbench/test/integration/collections_test.rb b/apps/workbench/test/integration/collections_test.rb
index e7b27fff8..1edfc1050 100644
--- a/apps/workbench/test/integration/collections_test.rb
+++ b/apps/workbench/test/integration/collections_test.rb
@@ -41,11 +41,19 @@ class CollectionsTest < ActionDispatch::IntegrationTest
     send(link_assertion, all("a").select { |a| a[:href] =~ link_regexp })
   end
 
+  test "Hides sharing link button when configured to do so" do
+    Rails.configuration.Workbench.DisableSharingURLsUI = true
+    coll_uuid = api_fixture("collections", "collection_owned_by_active", "uuid")
+    visit page_with_token("active_trustedclient", "/collections/#{coll_uuid}")
+    assert_no_selector 'input', text: 'Create sharing link'
+  end
+
   test "creating and uncreating a sharing link" do
     coll_uuid = api_fixture("collections", "collection_owned_by_active", "uuid")
     download_link_re =
       Regexp.new(Regexp.escape("/c=#{coll_uuid}/"))
     visit page_with_token("active_trustedclient", "/collections/#{coll_uuid}")
+    assert_selector 'input', text: 'Create sharing link'
     within "#sharing-button" do
       check_sharing(:on, download_link_re)
       check_sharing(:off, download_link_re)

commit 27ba0e2e0733ddaeb7437dc4194f684306636635
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Jun 8 09:59:02 2022 -0300

    19177: Do not show the collection's sharing button on wb1 when it shouldn't.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/apps/workbench/app/views/collections/show.html.erb b/apps/workbench/app/views/collections/show.html.erb
index 56712661c..8a9200aeb 100644
--- a/apps/workbench/app/views/collections/show.html.erb
+++ b/apps/workbench/app/views/collections/show.html.erb
@@ -40,13 +40,11 @@ SPDX-License-Identifier: AGPL-3.0 %>
         </h3>
       </div>
       <div class="panel-body">
-        <!--
-        <input type="text" class="form-control" placeholder="Search"/>
-        -->
-
+        <% if !Rails.configuration.Workbench.DisableSharingURLsUI %>
         <div id="sharing-button">
           <%= render partial: 'sharing_button' %>
         </div>
+        <% end %>
 
         <div style="height:0.5em;"></div>
         <% if @projects.andand.any? %>

commit f84e4b2ab7cd923aff2f99c04cb1313b36866393
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Wed Jun 8 09:31:50 2022 -0300

    19177: Adds config to disable sharing links UI on workbenches.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/lib/config/config.default.yml b/lib/config/config.default.yml
index f6e991016..a9bbf4eee 100644
--- a/lib/config/config.default.yml
+++ b/lib/config/config.default.yml
@@ -1526,6 +1526,11 @@ Clusters:
       ShowUserAgreementInline: false
       SecretKeyBase: ""
 
+      # Set this configuration to true to avoid providing an easy way for users
+      # to share data with unauthenticated users; this may be necessary on
+      # installations where strict data access controls are needed.
+      DisableSharingURLsUI: false
+
       # Scratch directory used by the remote repository browsing
       # feature. If it doesn't exist, it (and any missing parents) will be
       # created using mkdir_p.
diff --git a/lib/config/export.go b/lib/config/export.go
index 3faa0062f..a55295d12 100644
--- a/lib/config/export.go
+++ b/lib/config/export.go
@@ -264,6 +264,7 @@ var whitelist = map[string]bool{
 	"Workbench.ArvadosDocsite":                            true,
 	"Workbench.ArvadosPublicDataDocURL":                   true,
 	"Workbench.DefaultOpenIdPrefix":                       false,
+	"Workbench.DisableSharingURLsUI":                      true,
 	"Workbench.EnableGettingStartedPopup":                 true,
 	"Workbench.EnablePublicProjectsPage":                  true,
 	"Workbench.FileViewersConfigURL":                      true,
diff --git a/sdk/go/arvados/config.go b/sdk/go/arvados/config.go
index 319fa1a38..0d8f29312 100644
--- a/sdk/go/arvados/config.go
+++ b/sdk/go/arvados/config.go
@@ -260,6 +260,7 @@ type Cluster struct {
 		ArvadosDocsite                   string
 		ArvadosPublicDataDocURL          string
 		DefaultOpenIdPrefix              string
+		DisableSharingURLsUI             bool
 		EnableGettingStartedPopup        bool
 		EnablePublicProjectsPage         bool
 		FileViewersConfigURL             string

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list