Add a flag to hide repositories entries in the Workbench menus. This is useful
authorWard Vandewege <wvandewege@veritasgenetics.com>
Fri, 12 Oct 2018 15:15:44 +0000 (11:15 -0400)
committerWard Vandewege <wvandewege@veritasgenetics.com>
Mon, 15 Oct 2018 21:05:37 +0000 (17:05 -0400)
in a scenario where the jobs api is disabled and there are no local git
repositories. Local git repositories are optional when using the containers api.

refs #14338

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <wvandewege@veritasgenetics.com>

apps/workbench/app/views/layouts/body.html.erb
apps/workbench/config/application.default.yml

index 124a78577f3e5cac875569c8912217d65b8fc1ce..b017b4a29ae2bbd35877301f5a6f021555eb6f11 100644 (file)
@@ -87,7 +87,9 @@ SPDX-License-Identifier: AGPL-3.0 %>
                     <i class="fa fa-lg fa-terminal fa-fw"></i> Virtual machines
                   <% end %>
                 </li>
+                <% if Rails.configuration.repositories %>
                 <li role="menuitem"><a href="/repositories" role="menuitem"><i class="fa fa-lg fa-code-fork fa-fw"></i> Repositories </a></li>
+                <% end -%>
                 <li role="menuitem"><a href="/current_token" role="menuitem"><i class="fa fa-lg fa-ticket fa-fw"></i> Current token</a></li>
                 <li role="menuitem">
                   <%= link_to ssh_keys_user_path(current_user), role: 'menu-item' do %>
@@ -121,9 +123,11 @@ SPDX-License-Identifier: AGPL-3.0 %>
                   <li role="presentation" class="dropdown-header">
                     Admin Settings
                   </li>
+                  <% if Rails.configuration.repositories %>
                   <li role="menuitem"><a href="/repositories">
                       <i class="fa fa-lg fa-code-fork fa-fw"></i> Repositories
                   </a></li>
+                  <% end -%>
                   <li role="menuitem"><a href="/virtual_machines">
                       <i class="fa fa-lg fa-terminal fa-fw"></i> Virtual machines
                   </a></li>
index e4ec4131286dac66d9a12947ad6d0ddd6bbad358..4e0a35a5550360252cae77e49e22ac1d7dec370f 100644 (file)
@@ -320,3 +320,9 @@ common:
   # Link to use for Arvados Workflow Composer app, or false if not available.
   #
   composer_url: false
+
+  #
+  # Should workbench allow management of local git repositories? Set to false if
+  # the jobs api is disabled and there are no local git repositories.
+  #
+  repositories: true