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
[#61178] Fix a few remote_identity related issues.
Pavel Balashou90f64cda7900
diff --git a/db/migrate/20250220123358_add_polymorphic_auth_source_and_integration_to_remote_identities.rb b/db/migrate/20250220123358_add_polymorphic_auth_source_and_integration_to_remote_identities.rbindex 5aaf92b226f..b8327af1467 100644--- a/db/migrate/20250220123358_add_polymorphic_auth_source_and_integration_to_remote_identities.rb+++ b/db/migrate/20250220123358_add_polymorphic_auth_source_and_integration_to_remote_identities.rb@@ -34,7 +34,8 @@ class AddPolymorphicAuthSourceAndIntegrationToRemoteIdentities < ActiveRecord::Mrename_column :remote_identities, :oauth_client_id, :auth_source_idadd_column :remote_identities, :auth_source_type, :string- remove_index :remote_identities, :auth_source_id, if_exists: true+ remove_index :remote_identities, :auth_source_id+ remove_index :remote_identities, %i[user_id auth_source_id]add_index :remote_identities, %i[auth_source_type auth_source_id]add_column :remote_identities, :integration_type, :string@@ -65,6 +66,7 @@ class AddPolymorphicAuthSourceAndIntegrationToRemoteIdentities < ActiveRecord::Mrename_column :remote_identities, :auth_source_id, :oauth_client_idadd_foreign_key :remote_identities, :oauth_clientsadd_index :remote_identities, :oauth_client_id+ add_index :remote_identities, %i[user_id oauth_client_id], unique: trueremove_column :remote_identities, :auth_source_typeremove_column :remote_identities, :integration_iddiff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/util.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/util.rbindex 42dcbbe621d..af207745372 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/util.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/util.rb@@ -66,6 +66,7 @@ module Storagesresponse.xml.xpath("//s:message").textend+ # rubocop:disable Metrics/AbcSizedef origin_user_id(caller:, storage:, auth_strategy:)case auth_strategy.keywhen :basic_auth@@ -95,6 +96,7 @@ module Storages"Cannot execute query without user context.")endend+ # rubocop:enable Metrics/AbcSizedef error_data_from_response(caller:, response:)payload = if response.respond_to?(:content_type)diff --git a/modules/storages/app/services/storages/one_drive_managed_folder_sync_service.rb b/modules/storages/app/services/storages/one_drive_managed_folder_sync_service.rbindex c18b78362fa..4388d8f5eda 100644--- a/modules/storages/app/services/storages/one_drive_managed_folder_sync_service.rb+++ b/modules/storages/app/services/storages/one_drive_managed_folder_sync_service.rb@@ -223,11 +223,11 @@ module Storagesenddef client_remote_identities_scope- RemoteIdentity.includes(:user).where(integration: @storage, auth_source: @storage.oauth_client)+ RemoteIdentity.includes(:user).where(integration: @storage)enddef admin_remote_identities_scope- RemoteIdentity.includes(:user).where(integration: @storage, auth_source: @storage.oauth_client, user: User.admin.active)+ RemoteIdentity.includes(:user).where(integration: @storage, user: User.admin.active)enddef root_folder = Peripherals::ParentFolder.new("/")