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
[#62107] Fix UserAuthProviderLink.users association.
Pavel Balashoucad4a3dba119
diff --git a/app/models/auth_provider.rb b/app/models/auth_provider.rbindex 130ae5aab74..087cd8fe95c 100644--- a/app/models/auth_provider.rb+++ b/app/models/auth_provider.rb@@ -1,3 +1,5 @@+# frozen_string_literal: true+#-- copyright# OpenProject is an open source project management software.# Copyright (C) the OpenProject GmbH@@ -32,7 +34,10 @@ class AuthProvider < ApplicationRecordhas_many :scim_clients, dependent: :restrict_with_errorhas_many :user_auth_provider_links, dependent: :destroy- has_many :users, through: :user_auth_provider_links+ has_many :users,+ -> { where(type: "User") },+ through: :user_auth_provider_links,+ source: :principalvalidates :display_name, presence: truevalidates :display_name, uniqueness: truediff --git a/spec/requests/scim_v2/schemas_spec.rb b/spec/requests/scim_v2/schemas_spec.rbindex 618e05d7b0f..3d37867a7ba 100644--- a/spec/requests/scim_v2/schemas_spec.rb+++ b/spec/requests/scim_v2/schemas_spec.rb@@ -42,7 +42,7 @@ RSpec.describe "SCIM API Schemas" dodescribe "GET /scim_v2/Schemas" docontext "with the feature flag enabled", with_flag: { scim_api: true } do- it "responds with supported schemas " do+ it "responds with supported schemas" doget "/scim_v2/Schemas", {}, headersresponse_body = JSON.parse(last_response.body)