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
Remove separate check for missing audience
Jan Sandbrink21a5cf8d6568
diff --git a/modules/storages/app/common/storages/peripherals/nextcloud_connection_validator.rb b/modules/storages/app/common/storages/peripherals/nextcloud_connection_validator.rbindex f989a56888e..f07cd169385 100644--- a/modules/storages/app/common/storages/peripherals/nextcloud_connection_validator.rb+++ b/modules/storages/app/common/storages/peripherals/nextcloud_connection_validator.rb@@ -58,16 +58,7 @@ module Storagesdef sso_misconfiguredreturn None() unless @storage.authenticate_via_idp?- audience_missing.or { non_provisioned_user }.or { non_oidc_provisioned_user }- end-- def audience_missing- return None() if @storage.audience.present?-- Some(ConnectionValidation.new(type: :error,- error_code: :oidc_audience_missing,- timestamp: Time.current,- description: I18n.t("storages.health.connection_validation.oidc_audience_missing")))+ non_provisioned_user.or { non_oidc_provisioned_user }enddef non_provisioned_userdiff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.ymlindex d374a5c650d..c883aa19a46 100644--- a/modules/storages/config/locales/en.yml+++ b/modules/storages/config/locales/en.yml@@ -232,7 +232,6 @@ en:host_not_found: No Nextcloud server found at the configured host url. Please check the configuration.missing_dependencies: 'A required dependency is missing on the file storage. Please add the following dependency: %{dependency}.'not_configured: The connection could not be validated. Please finish configuration first.- oidc_audience_missing: The storage has no audience defined. This is necessary for OpenID Connect integration.oidc_non_oidc_user: The current user, while provisioned, wasn't provisioned by an OpenID Connect (OIDC) Identity Provider. Please re-run the check with an OIDC provisioned user.oidc_non_provisioned_user: The current user isn't provided by an OpenID Connect Identity Provider. Please re-run the check with a provided user.placeholder: Check your connection against the server.diff --git a/modules/storages/spec/common/storages/peripherals/nextcloud_connection_validator_spec.rb b/modules/storages/spec/common/storages/peripherals/nextcloud_connection_validator_spec.rbindex 8b4ec06c136..ed7a3092c68 100644--- a/modules/storages/spec/common/storages/peripherals/nextcloud_connection_validator_spec.rb+++ b/modules/storages/spec/common/storages/peripherals/nextcloud_connection_validator_spec.rb@@ -255,11 +255,11 @@ RSpec.describe Storages::Peripherals::NextcloudConnectionValidator doendit "returns a validation failure if storage audience isn't set" do- storage.update(nextcloud_audience: nil)+ storage.update!(nextcloud_audience: nil)- expect(subject.type).to eq(:error)- expect(subject.error_code).to eq(:oidc_audience_missing)- expect(subject.description).to eq(I18n.t("storages.health.connection_validation.oidc_audience_missing"))+ expect(subject.type).to eq(:none)+ expect(subject.error_code).to eq(:wrn_not_configured)+ expect(subject.description).to eq(I18n.t("storages.health.connection_validation.not_configured"))endit "returns a validation warning if the current user isn't provided" do