<% unless @organization %>
You need to be Admin or Super Admin in your company to access this panel.
<% else %>
-
Maestrano account
<%= link_to "Disconnect your Maestrano account", maestrano_connector_rails.signout_path %>
-
External account
<% if @organization.oauth_uid %>
<%= link_to "Disconnect #{@organization.name} (#{@organization.uid})", 'some_path' %>
<% else %>
<%= link_to "Connect #{@organization.name} (#{@organization.uid})", 'some_other_path' %>
<% end %>
-
<%= link_to "Force a synchronization", admin_synchronize_path, method: :post %>
Enable or disable synchronizations
<%= "Synchronizations are currently #{@organization.sync_enabled ? 'enabled' : 'disabled'}." %>
<%= link_to "#{@organization.sync_enabled ? 'Disable' : 'Enable'} them", admin_toggle_sync_path, method: :put %>
Synchronized entities
You can customize which entities are synchronized by the connector
<%= form_tag admin_update_path(id: @organization.id), method: :put do %>
<% @organization.synchronized_entities.each do |k, v| %>
<% if v && @organization.oauth_uid %>
<%= link_to "Force a synchronization for #{k.to_s.humanize.pluralize} only", admin_synchronize_path(opts: {only_entities: [k.to_s]}), method: :post %>
<% end %>
<% end %>
<%= submit_tag :Update%>
<% end %>
IdMap
<% @idmaps.each do |idmap| %>
<%= idmap.connec_entity ? idmap.connec_entity.humanize : nil %>
<%= idmap.connec_id %>
<%= idmap.external_entity ? idmap.external_entity.humanize : nil %>
<%= idmap.external_id %>
<% end %>
<% end %>