17754: Hides account linking buttons when LoginCluster is configured.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Thu, 17 Feb 2022 22:19:26 +0000 (19:19 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Thu, 17 Feb 2022 22:19:26 +0000 (19:19 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

apps/workbench/app/views/users/link_account.html.erb

index 86a0446e76e07603b079ac50465a63a3885c81cb..e45073e288fee16bf4d843df4d3d0dba2061b21d 100644 (file)
@@ -75,6 +75,8 @@ SPDX-License-Identifier: AGPL-3.0 %>
   });
 <% end %>
 
+<% if Rails.configuration.Login.LoginCluster.empty? %>
+
 <div id="need-login" style="display: none">
 
   <p>You are currently logged in as <b><%= Thread.current[:user].email %></b> (<%= Thread.current[:user].username%>, <%= Thread.current[:user].uuid %>) created at <b><%= Thread.current[:user].created_at%></b></p>
@@ -91,7 +93,7 @@ SPDX-License-Identifier: AGPL-3.0 %>
     <i class="fa fa-fw fa-sign-in"></i> Use this login to access another account
   </button>
 
-</p>
+  </p>
 </div>
 
 <div id="ready-to-link" style="display: none">
@@ -105,8 +107,13 @@ SPDX-License-Identifier: AGPL-3.0 %>
     <input type="hidden" id="new-user-token-input" name="direction" value="<%=params[:direction]%>" />
     <%= button_tag class: "btn btn-primary", id: "link-account-submit" do %>
       <i class="fa fa-fw fa-link"></i> Link accounts
+    <% end %>
   <% end %>
-<% end %>
 
 </div>
+
+<% else %>
+<div>
+Self-serve account linking is not supported on this cluster. Please contact your Arvados administrator.
 </div>
+<% end %>