<% # Copyright (C) 2014 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see . %> <% @external_integration_keys ||= {} external_integration_keys = @external_integration_keys.select { |key_type, key| key.grants_any_right?(@current_user, :read, :write) } %> <% unless external_integration_keys.empty? %>

<%= t('External Integration Keys') %>

<%= t("External Integration Keys") %> <% external_integration_keys.each do |key_type, key| %> <%= f.fields_for :external_integration_keys do |external_integration_key| %>
<%= external_integration_key.label key_type, "#{ExternalIntegrationKey.label_for(key_type)}:" %> <% if key.grants_right?(@current_user, :write) %> <%= external_integration_key.text_field key_type, value: key.key_value %> <% else %> <%= key.key_value %> <% end %>
<% end %> <% end %>
<% end %>