OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Know when metadata was requested last
Oliver Günther00e165f9dc80
diff --git a/modules/auth_saml/app/components/saml/providers/sections/form_component.html.erb b/modules/auth_saml/app/components/saml/providers/sections/form_component.html.erbindex 4bbd73674b0..5115da16160 100644--- a/modules/auth_saml/app/components/saml/providers/sections/form_component.html.erb+++ b/modules/auth_saml/app/components/saml/providers/sections/form_component.html.erb@@ -14,6 +14,15 @@endend+ if @banner+ flex.with_row do+ icon = @banner_scheme == :warning ? :alert : :info+ render(Primer::Alpha::Banner.new(scheme: @banner_scheme, icon:)) do+ @banner+ end+ end+ end+flex.with_row dorender(@form_class.new(form, provider:))enddiff --git a/modules/auth_saml/app/components/saml/providers/sections/form_component.rb b/modules/auth_saml/app/components/saml/providers/sections/form_component.rbindex 98e854d4ccf..07cabe0ad1f 100644--- a/modules/auth_saml/app/components/saml/providers/sections/form_component.rb+++ b/modules/auth_saml/app/components/saml/providers/sections/form_component.rb@@ -32,7 +32,9 @@ module Saml::Providers::Sectionsclass FormComponent < SectionComponentattr_reader :edit_state, :next_edit_state, :edit_mode- def initialize(provider, edit_state:, form_class:, heading:, next_edit_state: nil, edit_mode: nil)+ def initialize(provider, edit_state:, form_class:,+ heading:, banner: nil, banner_scheme: :info,+ next_edit_state: nil, edit_mode: nil)super(provider)@edit_state = edit_state@@ -40,6 +42,8 @@ module Saml::Providers::Sections@edit_mode = edit_mode@form_class = form_class@heading = heading+ @banner = banner+ @banner_scheme = banner_schemeenddef urldiff --git a/modules/auth_saml/app/controllers/saml/providers_controller.rb b/modules/auth_saml/app/controllers/saml/providers_controller.rbindex efb09d7aa47..ef4cfce3057 100644--- a/modules/auth_saml/app/controllers/saml/providers_controller.rb+++ b/modules/auth_saml/app/controllers/saml/providers_controller.rb@@ -162,7 +162,7 @@ module Saml.callif call.success?- apply_metadata(call.result)+ apply_metadata(call.result.compact_blank)else@edit_state = :metadata@@ -171,11 +171,12 @@ module Samlendend- def apply_metadata(params)- new_options = @provider.options.merge(params.compact_blank)+ def apply_metadata(params) # rubocop:disable Metrics/AbcSize+ new_options = @provider.options.merge(params)+ last_metadata_update = params.blank? ? nil : Time.currentcall = Saml::Providers::UpdateService.new(model: @provider, user: User.current)- .call({ options: new_options })+ .call({ options: new_options, last_metadata_update: })if call.success?flash[:notice] = I18n.t("saml.metadata_parser.success")diff --git a/modules/auth_saml/app/models/saml/provider.rb b/modules/auth_saml/app/models/saml/provider.rbindex e2544a5028e..d56d36bffdd 100644--- a/modules/auth_saml/app/models/saml/provider.rb+++ b/modules/auth_saml/app/models/saml/provider.rb@@ -8,6 +8,7 @@ module Samlstore_attribute :options, :name_identifier_format, :stringstore_attribute :options, :metadata_url, :stringstore_attribute :options, :metadata_xml, :string+ store_attribute :options, :last_metadata_update, :datetimestore_attribute :options, :idp_sso_service_url, :stringstore_attribute :options, :idp_slo_service_url, :string