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
[#57708] removed file ids query
Eric Schuberta8731ceb7563
diff --git a/modules/storages/app/common/storages/peripherals/nextcloud_registry.rb b/modules/storages/app/common/storages/peripherals/nextcloud_registry.rbindex 88ec1b80318..93b35affbad 100644--- a/modules/storages/app/common/storages/peripherals/nextcloud_registry.rb+++ b/modules/storages/app/common/storages/peripherals/nextcloud_registry.rb@@ -35,7 +35,6 @@ module Storagesregister(:auth_check, StorageInteraction::Nextcloud::AuthCheckQuery)register(:capabilities, StorageInteraction::Nextcloud::CapabilitiesQuery)register(:download_link, StorageInteraction::Nextcloud::DownloadLinkQuery)- register(:file_ids, StorageInteraction::Nextcloud::FileIdsQuery)register(:file_info, StorageInteraction::Nextcloud::FileInfoQuery)register(:files_info, StorageInteraction::Nextcloud::FilesInfoQuery)register(:files, StorageInteraction::Nextcloud::FilesQuery)diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/copy_template_folder_command.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/copy_template_folder_command.rbindex 6b3aef7fdfb..c69ef2e6d21 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/copy_template_folder_command.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/copy_template_folder_command.rb@@ -46,15 +46,17 @@ module Storagesdef call(auth_strategy:, source_path:, destination_path:)with_tagged_logger do- valid_input_result = validate_inputs(source_path, destination_path).on_failure { return _1 }+ Authentication[auth_strategy].call(storage: @storage) do |http|+ valid_input_result = validate_inputs(source_path, destination_path).on_failure { return _1 }- remote_urls = build_origin_urls(**valid_input_result.result)+ remote_urls = build_origin_urls(**valid_input_result.result)- ensure_remote_folder_does_not_exist(auth_strategy, remote_urls[:destination_url]).on_failure { return _1 }+ ensure_remote_folder_does_not_exist(http, remote_urls[:destination_url]).on_failure { return _1 }- copy_folder(auth_strategy, **remote_urls).on_failure { return _1 }+ copy_folder(http, **remote_urls).on_failure { return _1 }- get_folder_id(valid_input_result.result[:destination_path])+ get_folder_id(auth_strategy, valid_input_result.result[:destination_path])+ endendend@@ -76,9 +78,9 @@ module Storages{ source_url:, destination_url: }end- def ensure_remote_folder_does_not_exist(auth_strategy, destination_url)+ def ensure_remote_folder_does_not_exist(http, destination_url)info "Checking if #{destination_url} does not already exists."- response = Authentication[auth_strategy].call(storage: @storage) { |http| http.head(destination_url) }+ response = http.head(destination_url)case responsein { status: 200..299 }@@ -98,13 +100,11 @@ module Storagesendend- def copy_folder(auth_strategy, source_url:, destination_url:)+ def copy_folder(http, source_url:, destination_url:)info "Copying #{source_url} to #{destination_url}"- response = Authentication[auth_strategy].call(storage: @storage) do |http|- http.request("COPY", source_url, headers: { "Destination" => destination_url, "Depth" => "infinity" })- end-- handle_response(response)+ handle_response http.request("COPY",+ source_url,+ headers: { "Destination" => destination_url, "Depth" => "infinity" })end# rubocop:disable Metrics/AbcSize@@ -133,14 +133,14 @@ module Storageserrors: Util.storage_error(response:, code: :error, source:))endend- # rubocop:enable Metrics/AbcSize- def get_folder_id(destination_path)- call = Registry- .resolve("#{@storage.short_provider_type}.queries.file_ids")- .call(storage: @storage, path: destination_path)+ # rubocop:enable Metrics/AbcSize- call.map { |result| @data.with(id: result[destination_path]["fileid"]) }+ def get_folder_id(auth_strategy, destination_path)+ Registry+ .resolve("nextcloud.queries.file_path_to_id_map")+ .call(storage: @storage, auth_strategy:, folder: ParentFolder.new(destination_path), depth: 0)+ .map { |result| @data.with(id: result[destination_path].id) }enddef source = self.classdiff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/file_ids_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/file_ids_query.rbdeleted file mode 100644index 6b03b12b84e..00000000000--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/file_ids_query.rb+++ /dev/null@@ -1,56 +0,0 @@-# frozen_string_literal: true--#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See COPYRIGHT and LICENSE files for more details.-#++--module Storages- module Peripherals- module StorageInteraction- module Nextcloud- class FileIdsQuery- include TaggedLogging- def self.call(storage:, path:)- new(storage).call(path:)- end-- def initialize(storage)- @query = Internal::PropfindQueryLegacy.new(storage)- end-- def call(path:)- query_params = { depth: "1", path:, props: %w[oc:fileid] }- with_tagged_logger do- info "Requesting File Ids on path: #{path} and args: #{query_params.inspect}"- @query.call(**query_params)- end- end- end- end- end- end-enddiff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/file_path_to_id_map_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/file_path_to_id_map_query.rbindex 9ac13dd9f5c..cb0a766c507 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/file_path_to_id_map_query.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/file_path_to_id_map_query.rb@@ -33,8 +33,8 @@ module Storagesmodule StorageInteractionmodule Nextcloudclass FilePathToIdMapQuery- def self.call(storage:, auth_strategy:, folder:)- new(storage).call(auth_strategy:, folder:)+ def self.call(storage:, auth_strategy:, folder:, depth: Float::INFINITY)+ new(storage).call(auth_strategy:, folder:, depth:)enddef initialize(storage)@@ -42,16 +42,15 @@ module Storages@propfind_query = Internal::PropfindQuery.new(storage)end- def call(auth_strategy:, folder:)+ def call(auth_strategy:, folder:, depth:)origin_user_id = Util.origin_user_id(caller: self.class, storage: @storage, auth_strategy:)- .on_failure do |result|- return result- end+ .on_failure { return _1 }+ .result- Authentication[auth_strategy].call(storage: @storage, http_options:) do |http|+ Authentication[auth_strategy].call(storage: @storage, http_options: headers(depth)) do |http|# nc:acl-list is only required to avoid https://community.openproject.org/wp/49628. See comment #4.@propfind_query.call(http:,- username: origin_user_id.result,+ username: origin_user_id,path: folder.path,props: %w[oc:fileid nc:acl-list]).map do |obj|@@ -62,8 +61,8 @@ module Storagesprivate- def http_options- Util.webdav_request_with_depth("infinity")+ def headers(depth)+ Util.webdav_request_with_depth(depth.to_s.downcase)endendenddiff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/file_path_to_id_map_query.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/file_path_to_id_map_query.rbindex a13c61ff114..7e4e7aa8299 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/file_path_to_id_map_query.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/file_path_to_id_map_query.rb@@ -36,8 +36,8 @@ module StoragesCHILDREN_FIELDS = %w[id name file folder parentReference].freezeFOLDER_FIELDS = %w[id name parentReference].freeze- def self.call(storage:, auth_strategy:, folder:)- new(storage).call(auth_strategy:, folder:)+ def self.call(storage:, auth_strategy:, folder:, depth: Float::INFINITY)+ new(storage).call(auth_strategy:, folder:, depth:)enddef initialize(storage)@@ -46,15 +46,18 @@ module Storages@drive_item_query = Internal::DriveItemQuery.new(storage)end- def call(auth_strategy:, folder:)+ # rubocop:disable Metrics/AbcSize+ def call(auth_strategy:, folder:, depth:)Authentication[auth_strategy].call(storage: @storage) do |http|- fetch_result = fetch_folder(http, folder)- return fetch_result if fetch_result.failure?+ fetched_folder = fetch_folder(http, folder)+ .on_failure { return _1 }+ .result- file_ids_dictionary = fetch_result.result+ file_ids_dictionary = fetched_folderqueue = [folder]+ level = 0- while queue.any?+ while queue.any? && level < depthdir = queue.shiftvisit = visit(http, dir)@@ -63,12 +66,15 @@ module Storagesentry, to_queue = visit.result.values_at(:entry, :to_queue)file_ids_dictionary = file_ids_dictionary.merge(entry)queue.concat(to_queue)+ level += 1endServiceResult.success(result: file_ids_dictionary)endend+ # rubocop:enable Metrics/AbcSize+privatedef visit(http, folder)diff --git a/modules/storages/app/services/storages/nextcloud_managed_folder_sync_service.rb b/modules/storages/app/services/storages/nextcloud_managed_folder_sync_service.rbindex 0bd046524fd..29d2a545a7f 100644--- a/modules/storages/app/services/storages/nextcloud_managed_folder_sync_service.rb+++ b/modules/storages/app/services/storages/nextcloud_managed_folder_sync_service.rb@@ -34,9 +34,14 @@ module StoragesFILE_PERMISSIONS = OpenProject::Storages::Engine.external_file_permissions- include Injector["nextcloud.commands.create_folder", "nextcloud.commands.rename_file", "nextcloud.commands.set_permissions",- "nextcloud.queries.group_users", "nextcloud.queries.file_ids", "nextcloud.authentication.userless",- "nextcloud.commands.add_user_to_group", "nextcloud.commands.remove_user_from_group"]+ include Injector["nextcloud.commands.create_folder",+ "nextcloud.commands.rename_file",+ "nextcloud.commands.set_permissions",+ "nextcloud.queries.group_users",+ "nextcloud.queries.file_path_to_id_map",+ "nextcloud.authentication.userless",+ "nextcloud.commands.add_user_to_group",+ "nextcloud.commands.remove_user_from_group"]def self.i18n_key = "NextcloudSyncService"@@ -283,7 +288,11 @@ module Storagesdef remote_root_folder_map(group_folder)info "Retrieving already existing folders under #{group_folder}"- file_ids.call(storage: @storage, path: group_folder).on_failure do |service_result|+ file_path_to_id_map.call(storage: @storage,+ auth_strategy:,+ folder: Peripherals::ParentFolder.new(group_folder),+ depth: 1)+ .on_failure do |service_result|log_storage_error(service_result.errors, { folder: group_folder })add_error(:remote_folders, service_result.errors, options: { group_folder:, username: @storage.username }).fail!enddiff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/file_path_to_id_map_query_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/file_path_to_id_map_query_spec.rbindex 89e5416a495..781bf308001 100644--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/file_path_to_id_map_query_spec.rb+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/file_path_to_id_map_query_spec.rb@@ -42,26 +42,56 @@ RSpec.describe Storages::Peripherals::StorageInteraction::Nextcloud::FilePathToIit_behaves_like "file_path_to_id_map_query: basic query setup"- context "with parent folder being root", vcr: "nextcloud/file_path_to_id_map_query_root" do+ context "with parent folder being root" dolet(:folder) { Storages::Peripherals::ParentFolder.new("/") }- let(:expected_ids) do- {- "/" => "2",- "/Folder with spaces" => "165",- "/Folder with spaces/New Requests" => "166",- "/Folder with spaces/New Requests/request_001.md" => "167",- "/Folder with spaces/New Requests/request_002.md" => "168",- "/Folder" => "169",- "/Folder/android-studio-2021.3.1.17-linux.tar.gz" => "267",- "/Folder/empty" => "172",- "/Folder/Ümlæûts" => "350",- "/Folder/Ümlæûts/Anrüchiges deutsches Dokument.docx" => "351",- "/Practical_guide_to_BAGGM_Digital.pdf" => "295",- "/Readme.md" => "268"- }++ context "with unset depth (defaults to INFINITY)", vcr: "nextcloud/file_path_to_id_map_query_root_depth_infinite" do+ let(:expected_ids) do+ {+ "/" => "2",+ "/Folder with spaces" => "165",+ "/Folder with spaces/New Requests" => "166",+ "/Folder with spaces/New Requests/I❤️you death star.md" => "167",+ "/Folder with spaces/New Requests/request_002.md" => "168",+ "/Folder with spaces/Ümläuts & spe¢iæl characters" => "360",+ "/Folder with spaces/Ümläuts & spe¢iæl characters/what_have_you_done.md" => "361",+ "/My files" => "169",+ "/My files/android-studio-linux.tar.gz" => "267",+ "/My files/empty" => "172",+ "/My files/Ümlæûts" => "350",+ "/My files/Ümlæûts/Anrüchiges deutsches Dokument.docx" => "351",+ "/Practical_guide_to_BAGGM_Digital.pdf" => "295",+ "/Readme.md" => "268",+ "/VCR" => "773",+ "/VCR/placeholder" => "790"+ }+ end++ it_behaves_like "file_path_to_id_map_query: successful query"end- it_behaves_like "file_path_to_id_map_query: successful query"+ context "with depth 0", vcr: "nextcloud/file_path_to_id_map_query_root_depth_0" do+ let(:depth) { 0 }+ let(:expected_ids) { { "/" => "2" } }++ it_behaves_like "file_path_to_id_map_query: successful query"+ end++ context "with depth 1", vcr: "nextcloud/file_path_to_id_map_query_root_depth_1" do+ let(:depth) { 1 }+ let(:expected_ids) do+ {+ "/" => "2",+ "/Folder with spaces" => "165",+ "/My files" => "169",+ "/Practical_guide_to_BAGGM_Digital.pdf" => "295",+ "/Readme.md" => "268",+ "/VCR" => "773"+ }+ end++ it_behaves_like "file_path_to_id_map_query: successful query"+ endendcontext "with a given parent folder", vcr: "nextcloud/file_path_to_id_map_query_parent_folder" dodiff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/file_path_to_id_map_query_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/file_path_to_id_map_query_spec.rbindex 30e21b95feb..b6a157ab4a7 100644--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/file_path_to_id_map_query_spec.rb+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/file_path_to_id_map_query_spec.rb@@ -41,30 +41,54 @@ RSpec.describe Storages::Peripherals::StorageInteraction::OneDrive::FilePathToIdcontext "with parent folder being root", vcr: "one_drive/file_path_to_id_map_query_root" dolet(:folder) { Storages::Peripherals::ParentFolder.new("/") }- let(:expected_ids) do- {- "/" => "01AZJL5PN6Y2GOVW7725BZO354PWSELRRZ",- "/Folder with spaces" => "01AZJL5PKU2WV3U3RKKFF2A7ZCWVBXRTEU",- "/Folder with spaces/very empty folder" => "01AZJL5PMGEIRPHZPHRRH2NM3D734VIR7H",- "/Folder with spaces/wordle1.png" => "01AZJL5PPMSBBO3R2BIZHJFCELSW3RP7GN",- "/Folder with spaces/wordle2.png" => "01AZJL5PIIFUD6A765KBAIAEMYACAFB2WP",- "/Folder with spaces/wordle3.png" => "01AZJL5PL4AUJEU43CQZFJKN7BQPRP3BLF",- "/Folder" => "01AZJL5PMAXGDWAAKMEBALX4Q6GSN5BSBR",- "/Folder/Images" => "01AZJL5PMIF7ND3KH6FVDLZYP3E36ERFGI",- "/Folder/Subfolder" => "01AZJL5PPWP5UOATNRJJBYJG5TACDHEUAG",- "/Folder/Ümlæûts" => "01AZJL5PNQYF5NM3KWYNA3RJHJIB2XMMMB",- "/Folder/Document.docx" => "01AZJL5PJTICED3C5YSVAY6NWTBNA2XERU",- "/Folder/Sheet.xlsx" => "01AZJL5PLB7SH7633RMBHIH6KVMQRU4RJS",- "/Folder/Images/der_laufende.jpeg" => "01AZJL5PLZFCARRQIDFJF36UL2WTLXTNSY",- "/Folder/Images/written_in_stone.webp" => "01AZJL5PLNCKWYI752YBHYYJ6RBFZWOZ46",- "/Folder/Subfolder/NextcloudHub.md" => "01AZJL5PNCQCEBFI3N7JGZSX5AOX32Z3LA",- "/Folder/Subfolder/test.txt" => "01AZJL5PLOL2KZTJNVFBCJWFXYGYVBQVMZ",- "/Folder/Ümlæûts/Anrüchiges deutsches Dokument.docx" => "01AZJL5PNDURPQGKUSGFCJQJMNNWXKTHSE",- "/Permissions Folder" => "01AZJL5PN3LVLHH2RSZZDJ6ZFAD3OWSGYB"- }++ context "with unset depth (defaults to INFINITY)" do+ let(:expected_ids) do+ {+ "/" => "01AZJL5PN6Y2GOVW7725BZO354PWSELRRZ",+ "/Folder with spaces" => "01AZJL5PKU2WV3U3RKKFF2A7ZCWVBXRTEU",+ "/Folder with spaces/very empty folder" => "01AZJL5PMGEIRPHZPHRRH2NM3D734VIR7H",+ "/Folder with spaces/wordle1.png" => "01AZJL5PPMSBBO3R2BIZHJFCELSW3RP7GN",+ "/Folder with spaces/wordle2.png" => "01AZJL5PIIFUD6A765KBAIAEMYACAFB2WP",+ "/Folder with spaces/wordle3.png" => "01AZJL5PL4AUJEU43CQZFJKN7BQPRP3BLF",+ "/Folder" => "01AZJL5PMAXGDWAAKMEBALX4Q6GSN5BSBR",+ "/Folder/Images" => "01AZJL5PMIF7ND3KH6FVDLZYP3E36ERFGI",+ "/Folder/Subfolder" => "01AZJL5PPWP5UOATNRJJBYJG5TACDHEUAG",+ "/Folder/Ümlæûts" => "01AZJL5PNQYF5NM3KWYNA3RJHJIB2XMMMB",+ "/Folder/Document.docx" => "01AZJL5PJTICED3C5YSVAY6NWTBNA2XERU",+ "/Folder/Sheet.xlsx" => "01AZJL5PLB7SH7633RMBHIH6KVMQRU4RJS",+ "/Folder/Images/der_laufende.jpeg" => "01AZJL5PLZFCARRQIDFJF36UL2WTLXTNSY",+ "/Folder/Images/written_in_stone.webp" => "01AZJL5PLNCKWYI752YBHYYJ6RBFZWOZ46",+ "/Folder/Subfolder/NextcloudHub.md" => "01AZJL5PNCQCEBFI3N7JGZSX5AOX32Z3LA",+ "/Folder/Subfolder/test.txt" => "01AZJL5PLOL2KZTJNVFBCJWFXYGYVBQVMZ",+ "/Folder/Ümlæûts/Anrüchiges deutsches Dokument.docx" => "01AZJL5PNDURPQGKUSGFCJQJMNNWXKTHSE",+ "/Permissions Folder" => "01AZJL5PN3LVLHH2RSZZDJ6ZFAD3OWSGYB"+ }+ end++ it_behaves_like "file_path_to_id_map_query: successful query"end- it_behaves_like "file_path_to_id_map_query: successful query"+ context "with a depth of 0" do+ let(:depth) { 0 }+ let(:expected_ids) { { "/" => "01AZJL5PN6Y2GOVW7725BZO354PWSELRRZ" } }++ it_behaves_like "file_path_to_id_map_query: successful query"+ end++ context "with a depth of 1" do+ let(:depth) { 1 }+ let(:expected_ids) do+ {+ "/" => "01AZJL5PN6Y2GOVW7725BZO354PWSELRRZ",+ "/Folder with spaces" => "01AZJL5PKU2WV3U3RKKFF2A7ZCWVBXRTEU",+ "/Folder" => "01AZJL5PMAXGDWAAKMEBALX4Q6GSN5BSBR",+ "/Permissions Folder" => "01AZJL5PN3LVLHH2RSZZDJ6ZFAD3OWSGYB"+ }+ end++ it_behaves_like "file_path_to_id_map_query: successful query"+ endendcontext "with a given parent folder", vcr: "one_drive/file_path_to_id_map_query_parent_folder" dodiff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root.ymldeleted file mode 100644index 562e2ad833f..00000000000--- a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root.yml+++ /dev/null@@ -1,98 +0,0 @@-----http_interactions:-- request:- method: propfind- uri: https://nextcloud.local/remote.php/dav/files/admin- body:- encoding: UTF-8- string: |- <?xml version="1.0"?>- <d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">- <d:prop>- <oc:fileid/>- <nc:acl-list/>- </d:prop>- </d:propfind>- headers:- Depth:- - infinity- Authorization:- - Bearer <BEARER TOKEN>- User-Agent:- - httpx.rb/1.2.4- Accept:- - "*/*"- Accept-Encoding:- - gzip, deflate- Content-Type:- - application/xml; charset=utf-8- Content-Length:- - '192'- response:- status:- code: 207- message: Multi-Status- headers:- Cache-Control:- - no-store, no-cache, must-revalidate- Content-Encoding:- - gzip- Content-Security-Policy:- - default-src 'none';- Content-Type:- - application/xml; charset=utf-8- Date:- - Mon, 29 Apr 2024 09:21:37 GMT- Dav:- - 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search,- nextcloud-checksum-update, nc-calendar-search, nc-enable-birthday-calendar- Expires:- - Thu, 19 Nov 1981 08:52:00 GMT- Pragma:- - no-cache- Referrer-Policy:- - no-referrer- Server:- - Apache/2.4.59 (Debian)- Set-Cookie:- - oc07ul6b4oaw=dce80de6ee27126cc7f063c499bbf2d2; path=/; secure; HttpOnly; SameSite=Lax,- oc_sessionPassphrase=qHbGrRqzApLz65yOgbjo0F50qZOP7tl5seLjGa5MF5xAsfWUBS86U4TbnP6wBuwrqH1oAgAR19gOq6FYJvymPZW3tkMSKR9kS5YaIuyIWuqjif2txirDkqaymU7cOOVG;- path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=dce80de6ee27126cc7f063c499bbf2d2;- path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true;- path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax,- __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri,- 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=dce80de6ee27126cc7f063c499bbf2d2;- path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=dce80de6ee27126cc7f063c499bbf2d2;- path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=dce80de6ee27126cc7f063c499bbf2d2;- path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=dce80de6ee27126cc7f063c499bbf2d2;- path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=dce80de6ee27126cc7f063c499bbf2d2;- path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=dce80de6ee27126cc7f063c499bbf2d2;- path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=dce80de6ee27126cc7f063c499bbf2d2;- path=/; secure; HttpOnly; SameSite=Lax- Vary:- - Brief,Prefer- X-Content-Type-Options:- - nosniff- X-Debug-Token:- - 6Cb1TBf2Ullw34vWD3yf- X-Frame-Options:- - SAMEORIGIN- X-Permitted-Cross-Domain-Policies:- - none- X-Powered-By:- - PHP/8.2.18- X-Request-Id:- - 6Cb1TBf2Ullw34vWD3yf- X-Robots-Tag:- - noindex, nofollow- X-Xss-Protection:- - 1; mode=block- Content-Length:- - '477'- body:- encoding: UTF-8- string: |- <?xml version="1.0"?>- <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"><d:response><d:href>/remote.php/dav/files/admin/</d:href><d:propstat><d:prop><oc:fileid>2</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder/</d:href><d:propstat><d:prop><oc:fileid>169</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder/android-studio-2021.3.1.17-linux.tar.gz</d:href><d:propstat><d:prop><oc:fileid>267</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder/empty/</d:href><d:propstat><d:prop><oc:fileid>172</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder/%c3%9cml%c3%a6%c3%bbts/</d:href><d:propstat><d:prop><oc:fileid>350</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder/%c3%9cml%c3%a6%c3%bbts/Anr%c3%bcchiges%20deutsches%20Dokument.docx</d:href><d:propstat><d:prop><oc:fileid>351</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/</d:href><d:propstat><d:prop><oc:fileid>165</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/New%20Requests/</d:href><d:propstat><d:prop><oc:fileid>166</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/New%20Requests/request_001.md</d:href><d:propstat><d:prop><oc:fileid>167</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/New%20Requests/request_002.md</d:href><d:propstat><d:prop><oc:fileid>168</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Practical_guide_to_BAGGM_Digital.pdf</d:href><d:propstat><d:prop><oc:fileid>295</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Readme.md</d:href><d:propstat><d:prop><oc:fileid>268</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>- recorded_at: Mon, 29 Apr 2024 09:21:38 GMT-recorded_with: VCR 6.2.0diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root_depth_0.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root_depth_0.ymlnew file mode 100644index 00000000000..a6ee967ab95--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root_depth_0.yml@@ -0,0 +1,98 @@+---+http_interactions:+- request:+ method: propfind+ uri: https://nextcloud.local/remote.php/dav/files/admin+ body:+ encoding: UTF-8+ string: |+ <?xml version="1.0"?>+ <d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">+ <d:prop>+ <oc:fileid/>+ <nc:acl-list/>+ </d:prop>+ </d:propfind>+ headers:+ Depth:+ - '0'+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.1+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/xml; charset=utf-8+ Content-Length:+ - '192'+ response:+ status:+ code: 207+ message: Multi-Status+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Encoding:+ - gzip+ Content-Security-Policy:+ - default-src 'none';+ Content-Type:+ - application/xml; charset=utf-8+ Date:+ - Mon, 09 Sep 2024 14:06:46 GMT+ Dav:+ - 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search,+ nextcloud-checksum-update, nc-calendar-search, nc-enable-birthday-calendar+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.59 (Debian)+ Set-Cookie:+ - oc07ul6b4oaw=0e2bf236478ffa7e206813fcffc10e28; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=JfSm9aY2oVbQ8US%2BXKTpHqyK5QRr6DP2otXqhoqXfhj8xJylyuwTTw4e2RkNlGalL4NVCyy9aT9vrISN5lf563XTkeVliDatBMabXlUn67CvF%2Byg%2BTuXTTo%2FlyMdeg5d;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=0e2bf236478ffa7e206813fcffc10e28;+ path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true;+ path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax,+ __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri,+ 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=0e2bf236478ffa7e206813fcffc10e28;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=0e2bf236478ffa7e206813fcffc10e28;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=0e2bf236478ffa7e206813fcffc10e28;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=0e2bf236478ffa7e206813fcffc10e28;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=0e2bf236478ffa7e206813fcffc10e28;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=0e2bf236478ffa7e206813fcffc10e28;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=0e2bf236478ffa7e206813fcffc10e28;+ path=/; secure; HttpOnly; SameSite=Lax+ Vary:+ - Brief,Prefer+ X-Content-Type-Options:+ - nosniff+ X-Debug-Token:+ - mEyWbELH6q2kJulQSYjA+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.21+ X-Request-Id:+ - mEyWbELH6q2kJulQSYjA+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ Content-Length:+ - '244'+ body:+ encoding: UTF-8+ string: |+ <?xml version="1.0"?>+ <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"><d:response><d:href>/remote.php/dav/files/admin/</d:href><d:propstat><d:prop><oc:fileid>2</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>+ recorded_at: Mon, 09 Sep 2024 14:06:47 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root_depth_1.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root_depth_1.ymlnew file mode 100644index 00000000000..c2d711e9f89--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root_depth_1.yml@@ -0,0 +1,98 @@+---+http_interactions:+- request:+ method: propfind+ uri: https://nextcloud.local/remote.php/dav/files/admin+ body:+ encoding: UTF-8+ string: |+ <?xml version="1.0"?>+ <d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">+ <d:prop>+ <oc:fileid/>+ <nc:acl-list/>+ </d:prop>+ </d:propfind>+ headers:+ Depth:+ - '1'+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.1+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/xml; charset=utf-8+ Content-Length:+ - '192'+ response:+ status:+ code: 207+ message: Multi-Status+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Encoding:+ - gzip+ Content-Security-Policy:+ - default-src 'none';+ Content-Type:+ - application/xml; charset=utf-8+ Date:+ - Mon, 09 Sep 2024 14:06:47 GMT+ Dav:+ - 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search,+ nextcloud-checksum-update, nc-calendar-search, nc-enable-birthday-calendar+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.59 (Debian)+ Set-Cookie:+ - oc07ul6b4oaw=f663195643887b49aa2e556e7d87c05f; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=si2bSDRidz74z0Y8C3%2Bxrcse79aZZyLN6mIITel6H2PgF6i%2FJzFSs%2BAN23RJAfN9hlu%2B%2BpP5H2Y6Sv8iF221RcPRjB0ba9GdjJQa2wSiBWgbX3mBx3hqFlKB4qsGr2ah;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=f663195643887b49aa2e556e7d87c05f;+ path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true;+ path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax,+ __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri,+ 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=f663195643887b49aa2e556e7d87c05f;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=f663195643887b49aa2e556e7d87c05f;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=f663195643887b49aa2e556e7d87c05f;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=f663195643887b49aa2e556e7d87c05f;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=f663195643887b49aa2e556e7d87c05f;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=f663195643887b49aa2e556e7d87c05f;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=f663195643887b49aa2e556e7d87c05f;+ path=/; secure; HttpOnly; SameSite=Lax+ Vary:+ - Brief,Prefer+ X-Content-Type-Options:+ - nosniff+ X-Debug-Token:+ - f0xXuPYZTmTW8miDlwYf+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.21+ X-Request-Id:+ - f0xXuPYZTmTW8miDlwYf+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ Content-Length:+ - '427'+ body:+ encoding: UTF-8+ string: |+ <?xml version="1.0"?>+ <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"><d:response><d:href>/remote.php/dav/files/admin/</d:href><d:propstat><d:prop><oc:fileid>2</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/</d:href><d:propstat><d:prop><oc:fileid>165</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/My%20files/</d:href><d:propstat><d:prop><oc:fileid>169</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Practical_guide_to_BAGGM_Digital.pdf</d:href><d:propstat><d:prop><oc:fileid>295</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Readme.md</d:href><d:propstat><d:prop><oc:fileid>268</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/VCR/</d:href><d:propstat><d:prop><oc:fileid>773</oc:fileid><nc:acl-list><nc:acl><nc:acl-mapping-type>user</nc:acl-mapping-type><nc:acl-mapping-id>vcr</nc:acl-mapping-id><nc:acl-mapping-display-name>vcr</nc:acl-mapping-display-name><nc:acl-mask>31</nc:acl-mask><nc:acl-permissions>31</nc:acl-permissions></nc:acl></nc:acl-list></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response></d:multistatus>+ recorded_at: Mon, 09 Sep 2024 14:06:47 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root_depth_infinite.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root_depth_infinite.ymlnew file mode 100644index 00000000000..2329bfda2bb--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/file_path_to_id_map_query_root_depth_infinite.yml@@ -0,0 +1,98 @@+---+http_interactions:+- request:+ method: propfind+ uri: https://nextcloud.local/remote.php/dav/files/admin+ body:+ encoding: UTF-8+ string: |+ <?xml version="1.0"?>+ <d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">+ <d:prop>+ <oc:fileid/>+ <nc:acl-list/>+ </d:prop>+ </d:propfind>+ headers:+ Depth:+ - infinity+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.3.1+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ Content-Type:+ - application/xml; charset=utf-8+ Content-Length:+ - '192'+ response:+ status:+ code: 207+ message: Multi-Status+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Encoding:+ - gzip+ Content-Security-Policy:+ - default-src 'none';+ Content-Type:+ - application/xml; charset=utf-8+ Date:+ - Mon, 09 Sep 2024 14:04:03 GMT+ Dav:+ - 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search,+ nextcloud-checksum-update, nc-calendar-search, nc-enable-birthday-calendar+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.59 (Debian)+ Set-Cookie:+ - oc07ul6b4oaw=71064cc5df3a5e7bd8d9179c340c4dab; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=H%2BVMPNSuNA3ELOSV68a9AG722Qq%2Fs09dgww4ZYabMV0YHZyv842kM5QuOLv6lCMEl42anma5TpUAbJHW0wrR2dc7%2BAqBKdwwFwL6rGEfXPqtbAz%2BeON8ybKhnzw0tbn7;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=71064cc5df3a5e7bd8d9179c340c4dab;+ path=/; secure; HttpOnly; SameSite=Lax, __Host-nc_sameSiteCookielax=true;+ path=/; httponly;secure; expires=Fri, 31-Dec-2100 23:59:59 GMT; SameSite=lax,+ __Host-nc_sameSiteCookiestrict=true; path=/; httponly;secure; expires=Fri,+ 31-Dec-2100 23:59:59 GMT; SameSite=strict, oc07ul6b4oaw=71064cc5df3a5e7bd8d9179c340c4dab;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=71064cc5df3a5e7bd8d9179c340c4dab;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=71064cc5df3a5e7bd8d9179c340c4dab;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=71064cc5df3a5e7bd8d9179c340c4dab;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=71064cc5df3a5e7bd8d9179c340c4dab;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=71064cc5df3a5e7bd8d9179c340c4dab;+ path=/; secure; HttpOnly; SameSite=Lax, oc07ul6b4oaw=71064cc5df3a5e7bd8d9179c340c4dab;+ path=/; secure; HttpOnly; SameSite=Lax+ Vary:+ - Brief,Prefer+ X-Content-Type-Options:+ - nosniff+ X-Debug-Token:+ - tHdjNhNVN1e8HHQSUi3w+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.21+ X-Request-Id:+ - tHdjNhNVN1e8HHQSUi3w+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ Content-Length:+ - '666'+ body:+ encoding: UTF-8+ string: |+ <?xml version="1.0"?>+ <d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns"><d:response><d:href>/remote.php/dav/files/admin/</d:href><d:propstat><d:prop><oc:fileid>2</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/</d:href><d:propstat><d:prop><oc:fileid>165</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/New%20Requests/</d:href><d:propstat><d:prop><oc:fileid>166</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/New%20Requests/I%e2%9d%a4%ef%b8%8fyou%20death%20star.md</d:href><d:propstat><d:prop><oc:fileid>167</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/New%20Requests/request_002.md</d:href><d:propstat><d:prop><oc:fileid>168</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/%c3%9cml%c3%a4uts%20%26%20spe%c2%a2i%c3%a6l%20characters/</d:href><d:propstat><d:prop><oc:fileid>360</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Folder%20with%20spaces/%c3%9cml%c3%a4uts%20%26%20spe%c2%a2i%c3%a6l%20characters/what_have_you_done.md</d:href><d:propstat><d:prop><oc:fileid>361</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/My%20files/</d:href><d:propstat><d:prop><oc:fileid>169</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/My%20files/android-studio-linux.tar.gz</d:href><d:propstat><d:prop><oc:fileid>267</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/My%20files/empty/</d:href><d:propstat><d:prop><oc:fileid>172</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/My%20files/%c3%9cml%c3%a6%c3%bbts/</d:href><d:propstat><d:prop><oc:fileid>350</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/My%20files/%c3%9cml%c3%a6%c3%bbts/Anr%c3%bcchiges%20deutsches%20Dokument.docx</d:href><d:propstat><d:prop><oc:fileid>351</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Practical_guide_to_BAGGM_Digital.pdf</d:href><d:propstat><d:prop><oc:fileid>295</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/Readme.md</d:href><d:propstat><d:prop><oc:fileid>268</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/VCR/</d:href><d:propstat><d:prop><oc:fileid>773</oc:fileid><nc:acl-list><nc:acl><nc:acl-mapping-type>user</nc:acl-mapping-type><nc:acl-mapping-id>vcr</nc:acl-mapping-id><nc:acl-mapping-display-name>vcr</nc:acl-mapping-display-name><nc:acl-mask>31</nc:acl-mask><nc:acl-permissions>31</nc:acl-permissions></nc:acl></nc:acl-list></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat></d:response><d:response><d:href>/remote.php/dav/files/admin/VCR/placeholder/</d:href><d:propstat><d:prop><oc:fileid>790</oc:fileid></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><nc:acl-list/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>+ recorded_at: Mon, 09 Sep 2024 14:04:03 GMT+recorded_with: VCR 6.3.1diff --git a/modules/storages/spec/support/shared_examples_for_adapters/file_path_to_id_map_query_examples.rb b/modules/storages/spec/support/shared_examples_for_adapters/file_path_to_id_map_query_examples.rbindex d609e50588e..6abec5e1921 100644--- a/modules/storages/spec/support/shared_examples_for_adapters/file_path_to_id_map_query_examples.rb+++ b/modules/storages/spec/support/shared_examples_for_adapters/file_path_to_id_map_query_examples.rb@@ -40,13 +40,18 @@ RSpec.shared_examples_for "file_path_to_id_map_query: basic query setup" domethod = described_class.method(:call)expect(method.parameters).to contain_exactly(%i[keyreq storage],%i[keyreq auth_strategy],- %i[keyreq folder])+ %i[keyreq folder],+ %i[key depth])endendRSpec.shared_examples_for "file_path_to_id_map_query: successful query" doit "returns a map of locations to file ids" do- result = described_class.call(storage:, auth_strategy:, folder:)+ result = if defined?(depth)+ described_class.call(storage:, auth_strategy:, folder:, depth:)+ else+ described_class.call(storage:, auth_strategy:, folder:)+ endexpect(result).to be_success