mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 03:24:09 +00:00
Add support for displaying and managing legacy SSO providers (#628)
* feat: add support for displaying and managing legacy SSO providers - Introduced UI section for environment/YAML-configured SSO providers. - Added warnings and guidance on migrating legacy providers to database-backed configuration. - Enhanced localization with new keys for legacy provider management. - Updated form and toggle components for improved usability. * Expand SSO documentation: add SAML 2.0 support, JIT provisioning settings, super-admin setup steps, audit logging, and user administration details. * Update JIT provisioning docs: clarify role mapping behavior and add examples; note new `logout_idp` audit log event. --------- Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
This commit is contained in:
@@ -55,9 +55,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= form.check_box :enabled,
|
||||
label: "Enable this provider",
|
||||
checked: sso_provider.enabled? %>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="space-y-1">
|
||||
<p class="text-sm font-medium text-primary"><%= t("admin.sso_providers.form.enabled_label") %></p>
|
||||
<p class="text-xs text-secondary"><%= t("admin.sso_providers.form.enabled_help") %></p>
|
||||
</div>
|
||||
<%= form.toggle :enabled %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="border-t border-primary pt-4 space-y-4">
|
||||
|
||||
@@ -62,6 +62,44 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @legacy_providers.any? %>
|
||||
<%= settings_section title: t("admin.sso_providers.index.legacy_providers_title"), collapsible: true, open: true do %>
|
||||
<div class="bg-amber-50 border border-amber-200 rounded-lg p-3 mb-4">
|
||||
<div class="flex gap-2">
|
||||
<%= icon "alert-triangle", class: "w-5 h-5 text-amber-600 shrink-0" %>
|
||||
<p class="text-sm text-amber-800">
|
||||
<%= t("admin.sso_providers.index.legacy_providers_notice") %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="divide-y divide-primary">
|
||||
<% @legacy_providers.each do |provider| %>
|
||||
<div class="flex items-center justify-between py-3 first:pt-0 last:pb-0">
|
||||
<div class="flex items-center gap-3">
|
||||
<% provider_icon = provider[:icon].presence || "key" %>
|
||||
<%= icon provider_icon, class: "w-5 h-5 text-secondary" %>
|
||||
<div>
|
||||
<p class="font-medium text-primary"><%= provider[:label].presence || provider[:name] %></p>
|
||||
<p class="text-sm text-secondary">
|
||||
<%= provider[:strategy].to_s.titleize %> · <%= provider[:name] %>
|
||||
<% if provider[:issuer].present? %>
|
||||
· <span class="text-xs"><%= provider[:issuer] %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-amber-100 text-amber-800">
|
||||
<%= t("admin.sso_providers.index.env_configured") %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= settings_section title: "Configuration Mode", collapsible: true, open: false do %>
|
||||
<div class="space-y-3">
|
||||
<div class="flex items-center justify-between">
|
||||
|
||||
Reference in New Issue
Block a user