portainer badge

This commit is contained in:
Chris
2025-12-04 11:33:47 -08:00
parent 7721a952d7
commit a6328365ea
2 changed files with 7 additions and 2 deletions

View File

@@ -23,14 +23,13 @@
#
class SSOProvider < ApplicationRecord
belongs_to :account
belongs_to :configuration, polymorphic: true
belongs_to :configuration, polymorphic: true, dependent: :destroy
validates :account_id, uniqueness: true
enum :team_provisioning_mode, {
disabled: 0,
just_in_time: 1
# scim: 2
}

View File

@@ -6,6 +6,12 @@
<%= link_to "Sign up", new_user_registration_path, class: "underline" %> instead
</div>
<% if @account&.stack_manager&.portainer? %>
<div class="flex justify-center mt-2">
<%= render "devise/sessions/portainer_badge", stack_manager: @account.stack_manager, logged_in: false %>
</div>
<% end %>
<%= form_with(model: resource, as: resource_name, url: session_path(resource_name), html: { class: "space-y-4" }) do |f| %>
<% if flash[:alert] %>
<div class="alert alert-error mb-4">