</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? %>
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 'div#sharing-button'
+ 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 'div#sharing-button'
within "#sharing-button" do
check_sharing(:on, download_link_re)
check_sharing(:off, download_link_re)
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.
"Workbench.ArvadosDocsite": true,
"Workbench.ArvadosPublicDataDocURL": true,
"Workbench.DefaultOpenIdPrefix": false,
+ "Workbench.DisableSharingURLsUI": true,
"Workbench.EnableGettingStartedPopup": true,
"Workbench.EnablePublicProjectsPage": true,
"Workbench.FileViewersConfigURL": true,
ArvadosDocsite string
ArvadosPublicDataDocURL string
DefaultOpenIdPrefix string
+ DisableSharingURLsUI bool
EnableGettingStartedPopup bool
EnablePublicProjectsPage bool
FileViewersConfigURL string