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
Reintroduce sections, add one for mapping
Oliver Günther15490f22f15a
diff --git a/config/locales/en.yml b/config/locales/en.ymlindex 68e065616e0..67c686f7d8f 100644--- a/config/locales/en.yml+++ b/config/locales/en.yml@@ -2141,6 +2141,7 @@ en:label_api_doc: "API documentation"label_backup: "Backup"label_backup_code: "Backup code"+ label_basic_details: "Basic details"label_between: "between"label_blocked_by: "blocked by"label_blocks: "blocks"diff --git a/modules/openid_connect/app/components/openid_connect/providers/view_component.html.erb b/modules/openid_connect/app/components/openid_connect/providers/view_component.html.erbindex e6edcae4289..3291270d85f 100644--- a/modules/openid_connect/app/components/openid_connect/providers/view_component.html.erb+++ b/modules/openid_connect/app/components/openid_connect/providers/view_component.html.erb@@ -9,6 +9,10 @@<% end %><%= render(border_box_container) do |component|+ component.with_header(color: :muted) do+ render(Primer::Beta::Text.new(font_weight: :bold)) { I18n.t(:label_basic_details) }+ end+case provider.oidc_providerwhen 'google'component.with_row(scheme: :default) do@@ -99,10 +103,6 @@endendelse # custom-# component.with_header(color: :muted) do-# render(Primer::Beta::Text.new(font_weight: :bold)) { I18n.t('openid_connect.providers.label_basic_details') }-# end-component.with_row(scheme: :default) dobasic_details_component =if edit_state == :name@@ -126,9 +126,9 @@render(basic_details_component)end-# component.with_row(scheme: :neutral, color: :muted) do-# render(Primer::Beta::Text.new(font_weight: :bold)) { I18n.t('openid_connect.providers.label_automatic_configuration') }-# end+ component.with_row(scheme: :neutral, color: :muted) do+ render(Primer::Beta::Text.new(font_weight: :bold)) { I18n.t('openid_connect.providers.label_automatic_configuration') }+ endcomponent.with_row(scheme: :default) doif edit_state == :metadata@@ -153,9 +153,9 @@endend-# component.with_row(scheme: :neutral, color: :muted) do-# render(Primer::Beta::Text.new(font_weight: :bold)) { I18n.t('openid_connect.providers.label_advanced_configuration') }-# end+ component.with_row(scheme: :neutral, color: :muted) do+ render(Primer::Beta::Text.new(font_weight: :bold)) { I18n.t('openid_connect.providers.label_advanced_configuration') }+ endcomponent.with_row(scheme: :default) doif edit_state == :metadata_details@@ -205,6 +205,10 @@endend+ component.with_row(scheme: :neutral, color: :muted) do+ render(Primer::Beta::Text.new(font_weight: :bold)) { I18n.t('openid_connect.providers.label_optional_configuration') }+ end+component.with_row(scheme: :default) doif edit_state == :attribute_mappingrender(ns::Sections::FormComponent.new(@@ -221,8 +225,8 @@view_mode:,heading: t("openid_connect.providers.label_attribute_mapping"),description: t("openid_connect.providers.section_texts.attribute_mapping"),- label: provider.metadata_configured? ? t(:label_completed) : nil,- label_scheme: provider.metadata_configured? ? :success : :secondary+ label: provider.mapping_configured? ? t(:label_completed) : nil,+ label_scheme: provider.mapping_configured? ? :success : :secondary))endenddiff --git a/modules/openid_connect/app/models/openid_connect/provider.rb b/modules/openid_connect/app/models/openid_connect/provider.rbindex 06905634e29..d6faaed5d0c 100644--- a/modules/openid_connect/app/models/openid_connect/provider.rb+++ b/modules/openid_connect/app/models/openid_connect/provider.rb@@ -49,6 +49,12 @@ module OpenIDConnectendend+ def mapping_configured?+ MAPPABLE_ATTRIBUTES.any? do |mandatory_attribute|+ public_send(:"mapping_#{mandatory_attribute}").present?+ end+ end+def configured?basic_details_configured? && advanced_details_configured? && metadata_configured?enddiff --git a/modules/openid_connect/config/locales/en.yml b/modules/openid_connect/config/locales/en.ymlindex 652bdf07f3e..4a7bfe91dab 100644--- a/modules/openid_connect/config/locales/en.yml+++ b/modules/openid_connect/config/locales/en.yml@@ -70,9 +70,9 @@ en:label_edit: Edit OpenID provider %{name}label_empty_title: No OIDC providers configured yet.label_empty_description: Add a provider to see them here.- label_basic_details: Basic detailslabel_metadata: OpenID Connect Discovery Endpointlabel_automatic_configuration: Automatic configuration+ label_optional_configuration: Optional configurationlabel_advanced_configuration: Advanced configurationlabel_configuration_details: Metadatalabel_client_details: Client details