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
[#53996] use auth strategies in create folder commands
Eric Schubertb4fcc41828f3
diff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/create_folder_command.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/create_folder_command.rbindex 103e537c1e7..b13fe3c455b 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/create_folder_command.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/create_folder_command.rb@@ -32,32 +32,37 @@ module Storages::Peripherals::StorageInteraction::Nextcloudclass CreateFolderCommandusing Storages::Peripherals::ServiceResultRefinements- def initialize(storage)- @uri = storage.uri- @username = storage.username- @password = storage.password+ Auth = ::Storages::Peripherals::StorageInteraction::Authentication++ def self.call(storage:, auth_strategy:, folder_name:, parent_location:)+ new(storage).call(auth_strategy:, folder_name:, parent_location:)end- def self.call(storage:, folder_path:)- new(storage).call(folder_path:)+ def initialize(storage)+ @storage = storageend- # rubocop:disable Metrics/AbcSize- def call(folder_path:)- response = OpenProject- .httpx- .basic_auth(@username, @password)- .mkcol(- Util.join_uri_path(- @uri,- "remote.php/dav/files",- CGI.escapeURIComponent(@username),- Util.escape_path(folder_path)- )- )+ def call(auth_strategy:, folder_name:, parent_location:)+ origin_user_id = Util.origin_user_id(caller: self.class, storage: @storage, auth_strategy:)+ if origin_user_id.failure?+ return origin_user_id+ end++ folder_path = Util.join_uri_path(parent_location, folder_name)- error_data = Storages::StorageErrorData.new(source: self.class, payload: response)+ Auth[auth_strategy].call(storage: @storage) do |http|+ request_url = Util.join_uri_path(@storage.uri,+ "remote.php/dav/files",+ CGI.escapeURIComponent(origin_user_id.result),+ Util.escape_path(folder_path))+ handle_response http.mkcol(request_url)+ end+ end++ private++ def handle_response(response)case responsein { status: 200..299 }ServiceResult.success(message: "Folder was successfully created.")@@ -65,19 +70,27 @@ module Storages::Peripherals::StorageInteraction::Nextcloudif Util.error_text_from_response(response) == "The resource you tried to create already exists"ServiceResult.success(message: "Folder already exists.")else- Util.error(:not_allowed, "Outbound request method not allowed", error_data)+ Util.failure(code: :not_allowed,+ data: Util.error_data_from_response(caller: self.class, response:),+ log_message: "Outbound request method not allowed!")endin { status: 401 }- Util.error(:unauthorized, "Outbound request not authorized", error_data)+ Util.failure(code: :unauthorized,+ data: Util.error_data_from_response(caller: self.class, response:),+ log_message: "Outbound request not authorized!")in { status: 404 }- Util.error(:not_found, "Outbound request destination not found", error_data)+ Util.failure(code: :not_found,+ data: Util.error_data_from_response(caller: self.class, response:),+ log_message: "Outbound request destination not found!")in { status: 409 }- Util.error(:conflict, Util.error_text_from_response(response), error_data)+ Util.failure(code: :conflict,+ data: Util.error_data_from_response(caller: self.class, response:),+ log_message: Util.error_text_from_response(response))else- Util.error(:error, "Outbound request failed", error_data)+ Util.failure(code: :error,+ data: Util.error_data_from_response(caller: self.class, response:),+ log_message: "Outbound request failed with unknown error!")endend-- # rubocop:enable Metrics/AbcSizeendenddiff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/internal/delete_entity_command.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/internal/delete_entity_command.rbindex 8e70bf5f8f2..85b5df7ad9a 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/internal/delete_entity_command.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/nextcloud/internal/delete_entity_command.rb@@ -40,66 +40,38 @@ module Storages::Peripherals::StorageInteraction::Nextcloud::Internalenddef call(auth_strategy:, location:)- origin_user_id = origin_user_id(auth_strategy)+ origin_user_id = Util.origin_user_id(caller: self.class, storage: @storage, auth_strategy:)if origin_user_id.failure?return origin_user_idend- response = Auth[auth_strategy].call(storage: @storage) do |http|- http.delete(Util.join_uri_path(@storage.uri,- "remote.php/dav/files",- CGI.escapeURIComponent(origin_user_id.result),- Util.escape_path(location)))+ Auth[auth_strategy].call(storage: @storage) do |http|+ handle_response http.delete(Util.join_uri_path(@storage.uri,+ "remote.php/dav/files",+ CGI.escapeURIComponent(origin_user_id.result),+ Util.escape_path(location)))end+ end++ private+ def handle_response(response)case responsein { status: 200..299 }ServiceResult.successin { status: 404 }- failure(code: :not_found,- payload: response.json(symbolize_keys: true),- log_message: "Outbound request destination not found!")+ Util.failure(code: :not_found,+ data: Util.error_data_from_response(caller: self.class, response:),+ log_message: "Outbound request destination not found!")in { status: 401 }- failure(code: :unauthorized,- payload: response.json(symbolize_keys: true),- log_message: "Outbound request not authorized!")+ Util.failure(code: :unauthorized,+ data: Util.error_data_from_response(caller: self.class, response:),+ log_message: "Outbound request not authorized!")else- failure(code: :error,- payload: response.json(symbolize_keys: true),- log_message: "Outbound request failed with unknown error!")+ Util.failure(code: :error,+ data: Util.error_data_from_response(caller: self.class, response:),+ log_message: "Outbound request failed with unknown error!")endend-- private-- def origin_user_id(auth_strategy)- case auth_strategy.key- when :basic_auth- ServiceResult.success(result: @storage.username)- when :oauth_user_token- origin_user_id = OAuthClientToken.find_by(user_id: user, oauth_client: @storage.oauth_client)&.origin_user_id- if origin_user_id.present?- ServiceResult.success(result: origin_user_id)- else- failure(code: :error,- payload: nil,- log_message: "No origin user ID or user token found. Cannot execute query without user context.")- end- else- failure(code: :error,- payload: nil,- log_message: "No authentication strategy with user context found. " \- "Cannot execute query without user context.")- end- end-- def failure(code:, payload:, log_message:)- ServiceResult.failure(- result: code,- errors: ::Storages::StorageError.new(code:,- data: ::Storages::StorageErrorData.new(source: self.class, payload:),- log_message:)- )- endendenddiff --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 f8e091d393c..4264f7dbaf7 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@@ -80,7 +80,46 @@ module Storages::Peripherals::StorageInteraction::Nextcloud::Utilenddef error_text_from_response(response)- Nokogiri::XML(response.body).xpath("//s:message").text+ response.xml.xpath("//s:message").text+ end++ def origin_user_id(caller:, storage:, auth_strategy:)+ case auth_strategy.key+ when :basic_auth+ ServiceResult.success(result: storage.username)+ when :oauth_user_token+ origin_user_id = OAuthClientToken.find_by(user_id: auth_strategy.user, oauth_client: storage.oauth_client)&.origin_user_id+ if origin_user_id.present?+ ServiceResult.success(result: origin_user_id)+ else+ failure(code: :error,+ data: ::Storages::StorageErrorData.new(source: caller),+ log_message: "No origin user ID or user token found. Cannot execute query without user context.")+ end+ else+ failure(code: :error,+ data: ::Storages::StorageErrorData.new(source: caller),+ log_message: "No authentication strategy with user context found. " \+ "Cannot execute query without user context.")+ end+ end++ def error_data_from_response(caller:, response:)+ payload =+ case response.content_type.mime_type+ when "application/json"+ response.json+ when "text/xml", "application/xml"+ response.xml+ else+ response.body.to_s+ end++ ::Storages::StorageErrorData.new(source: caller, payload:)+ end++ def failure(code:, data:, log_message:)+ ServiceResult.failure(result: code, errors: ::Storages::StorageError.new(code:, data:, log_message:))endendenddiff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/create_folder_command.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/create_folder_command.rbindex 436b40364fa..75b3173e815 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/create_folder_command.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/create_folder_command.rb@@ -35,31 +35,34 @@ module Storagesclass CreateFolderCommandusing ServiceResultRefinements- def self.call(storage:, folder_path:)- new(storage).call(folder_path:)+ Auth = ::Storages::Peripherals::StorageInteraction::Authentication++ def self.call(storage:, auth_strategy:, folder_name:, parent_location:)+ new(storage).call(auth_strategy:, folder_name:, parent_location:)enddef initialize(storage)@storage = storage- @uri = storage.uriend- def call(folder_path:, parent_location: nil)- Util.using_admin_token(@storage) do |http|- response = http.post(uri_for(parent_location), body: payload(folder_path))-- handle_response(response)+ def call(auth_strategy:, folder_name:, parent_location:)+ Auth[auth_strategy].call(storage: @storage, http_options:) do |http|+ handle_response http.post(uri_for(parent_location), body: payload(folder_name))endend+ private++ def http_options+ Util.json_content_type+ end+def uri_for(parent_location)- return "#{base_uri}/root/children" if parent_location.nil?+ return "#{base_uri}/root/children" if parent_location.root?"#{base_uri}/items/#{parent_location}/children"end- private-def handle_response(response)data = ::Storages::StorageErrorData.new(source: self.class, payload: response)@@ -97,15 +100,15 @@ module Storages)end- def payload(folder_path)+ def payload(folder_name){- name: folder_path,+ name: folder_name,folder: {},"@microsoft.graph.conflictBehavior" => "fail"}.to_jsonend- def base_uri = "/v1.0/drives/#{@storage.drive_id}"+ def base_uri = Util.join_uri_path(@storage.uri, "v1.0", "drives", @storage.drive_id)endendenddiff --git a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/util.rb b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/util.rbindex 93529fcba79..ae2d0169588 100644--- a/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/util.rb+++ b/modules/storages/app/common/storages/peripherals/storage_interaction/one_drive/util.rb@@ -73,6 +73,10 @@ module Storages::Peripherals::StorageInteraction::OneDrive::UtilFile.join(uri.to_s, *)end+ def json_content_type+ { headers: { "Content-Type" => "application/json" } }+ end+def using_admin_token(storage)oauth_client = storage.oauth_configuration.basic_rack_oauth_clientdiff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/create_folder_command_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/create_folder_command_spec.rbnew file mode 100644index 00000000000..bb90f3e2060--- /dev/null+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/create_folder_command_spec.rb@@ -0,0 +1,121 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2024 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.+#++++require "spec_helper"+require_module_spec_helper++RSpec.describe Storages::Peripherals::StorageInteraction::Nextcloud::CreateFolderCommand, :vcr, :webmock do+ using Storages::Peripherals::ServiceResultRefinements++ let(:user) { create(:user) }+ let(:storage) do+ create(:nextcloud_storage_with_local_connection, :as_not_automatically_managed, oauth_client_token_user: user)+ end+ let(:auth_strategy) do+ Storages::Peripherals::StorageInteraction::AuthenticationStrategies::OAuthUserToken.strategy.with_user(user)+ end++ it "is registered as commands.nextcloud.create_folder" do+ expect(Storages::Peripherals::Registry.resolve("nextcloud.commands.create_folder")).to eq(described_class)+ end++ describe "#call" do+ it "responds with correct parameters" do+ expect(described_class).to respond_to(:call)++ method = described_class.method(:call)+ expect(method.parameters).to contain_exactly(%i[keyreq storage],+ %i[keyreq auth_strategy],+ %i[keyreq folder_name],+ %i[keyreq parent_location])+ end++ it "creates a folder in root", vcr: "nextcloud/create_folder_root" do+ folder_name = "New Folder"+ parent_location = Storages::Peripherals::ParentFolder.new("/")++ result = described_class.call(storage:, auth_strategy:, folder_name:, parent_location:)++ expect(result).to be_success+ ensure+ delete_created_folder(folder_name)+ end++ it "creates a folder in another folder", vcr: "nextcloud/create_folder_parent" do+ folder_name = "New Folder"+ parent_location = Storages::Peripherals::ParentFolder.new("/Folder")++ result = described_class.call(storage:, auth_strategy:, folder_name:, parent_location:)++ expect(result).to be_success+ ensure+ delete_created_folder("#{parent_location}/#{folder_name}")+ end++ context "if parent location does not exist" do+ it "returns a failure", vcr: "nextcloud/create_folder_parent_not_found" do+ folder_name = "New Folder"+ parent_location = Storages::Peripherals::ParentFolder.new("/DeathStar3")++ result = described_class.call(storage:, auth_strategy:, folder_name:, parent_location:)++ expect(result).to be_failure+ result.match(+ on_failure: ->(error) do+ expect(error.code).to eq(:conflict)+ expect(error.data.source).to be(described_class)+ expect(error.log_message).to eq("Parent node does not exist")+ end,+ on_success: ->(response) { fail "Expected failure, got #{response}" }+ )+ end+ end++ context "if folder already exists" do+ fit "returns a success", vcr: "nextcloud/create_folder_already_exists" do+ folder_name = "Folder"+ parent_location = Storages::Peripherals::ParentFolder.new("/")++ result = described_class.call(storage:, auth_strategy:, folder_name:, parent_location:)++ expect(result).to be_success+ expect(result.message).to eq("Folder already exists.")+ end+ end+ end++ private++ def delete_created_folder(location)+ Storages::Peripherals::Registry+ .resolve("nextcloud.commands.delete_folder")+ .call(storage:, auth_strategy:, location:)+ end+enddiff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/delete_folder_command_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/delete_folder_command_spec.rbnew file mode 100644index 00000000000..3627209dcf9--- /dev/null+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/nextcloud/delete_folder_command_spec.rb@@ -0,0 +1,86 @@+# frozen_string_literal: true++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2024 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.+#++++require "spec_helper"+require_module_spec_helper++RSpec.describe Storages::Peripherals::StorageInteraction::Nextcloud::DeleteFolderCommand, :vcr, :webmock do+ using Storages::Peripherals::ServiceResultRefinements++ let(:user) { create(:user) }+ let(:storage) do+ create(:nextcloud_storage_with_local_connection, :as_not_automatically_managed, oauth_client_token_user: user)+ end+ let(:auth_strategy) do+ Storages::Peripherals::StorageInteraction::AuthenticationStrategies::OAuthUserToken.strategy.with_user(user)+ end++ it "is registered as commands.nextcloud.delete_folder" do+ expect(Storages::Peripherals::Registry.resolve("nextcloud.commands.delete_folder")).to eq(described_class)+ end++ describe "#call" do+ it "responds with correct parameters" do+ expect(described_class).to respond_to(:call)++ method = described_class.method(:call)+ expect(method.parameters).to contain_exactly(%i[keyreq storage],+ %i[keyreq auth_strategy],+ %i[keyreq location])+ end++ it "deletes a folder", vcr: "nextcloud/delete_folder" do+ parent_location = Storages::Peripherals::ParentFolder.new("/")++ Storages::Peripherals::Registry+ .resolve("nextcloud.commands.create_folder")+ .call(storage:, auth_strategy:, folder_name: "To Be Deleted Soon", parent_location:)++ result = described_class.call(storage:, auth_strategy:, location: "/To Be Deleted Soon")++ expect(result).to be_success+ end++ context "if folder does not exist" do+ it "returns a failure", vcr: "nextcloud/delete_folder_not_found" do+ result = described_class.call(storage:, auth_strategy:, location: "/IDoNotExist")++ expect(result).to be_failure+ expect(result.error_source)+ .to be(Storages::Peripherals::StorageInteraction::Nextcloud::Internal::DeleteEntityCommand)++ result.match(+ on_failure: ->(error) { expect(error.code).to eq(:not_found) },+ on_success: ->(response) { fail "Expected failure, got #{response}" }+ )+ end+ end+ end+enddiff --git a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/delete_folder_command_spec.rb b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/delete_folder_command_spec.rbindex c5fe1d4d048..f2975fa724a 100644--- a/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/delete_folder_command_spec.rb+++ b/modules/storages/spec/common/storages/peripherals/storage_interaction/one_drive/delete_folder_command_spec.rb@@ -49,9 +49,11 @@ RSpec.describe Storages::Peripherals::StorageInteraction::OneDrive::DeleteFolderendit "deletes a folder", vcr: "one_drive/delete_folder" do+ parent_location = Storages::Peripherals::ParentFolder.new("/")+create_result = Storages::Peripherals::Registry.resolve("one_drive.commands.create_folder")- .call(storage:, folder_path: "To Be Deleted Soon")+ .call(storage:, auth_strategy:, folder_name: "To Be Deleted Soon", parent_location:)folder = create_result.resultdiff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_already_exists.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_already_exists.ymlnew file mode 100644index 00000000000..5667112fc99--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_already_exists.yml@@ -0,0 +1,79 @@+---+http_interactions:+- request:+ method: mkcol+ uri: https://nextcloud.local/remote.php/dav/files/admin/Folder+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.2.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 405+ message: Method Not Allowed+ headers:+ Allow:+ - OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Security-Policy:+ - default-src 'none';+ Content-Type:+ - application/xml; charset=utf-8+ Date:+ - Mon, 22 Apr 2024 12:17:40 GMT+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.57 (Debian)+ Set-Cookie:+ - ocirabgzify6=1ebed9064c22c126227200ab983e00ae; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=KDpjEpSmQONYPBRxMGJwGpWu%2FTjGIExqEWRDJQRISwqk8ePUxRro7FGwNCVW%2FOEu%2FdUv5JEDbym9%2BMZtZhRKOntxL4GQQjmbXfoVX%2F6t2vS0cMy5YAAQA0iNVHznnvb4;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=1ebed9064c22c126227200ab983e00ae;+ 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, ocirabgzify6=1ebed9064c22c126227200ab983e00ae;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=1ebed9064c22c126227200ab983e00ae;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=1ebed9064c22c126227200ab983e00ae;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=1ebed9064c22c126227200ab983e00ae;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=1ebed9064c22c126227200ab983e00ae;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=1ebed9064c22c126227200ab983e00ae;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=1ebed9064c22c126227200ab983e00ae;+ path=/; secure; HttpOnly; SameSite=Lax+ X-Content-Type-Options:+ - nosniff+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.16+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ Content-Length:+ - '247'+ body:+ encoding: UTF-8+ string: |+ <?xml version="1.0" encoding="utf-8"?>+ <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">+ <s:exception>Sabre\DAV\Exception\MethodNotAllowed</s:exception>+ <s:message>The resource you tried to create already exists</s:message>+ </d:error>+ recorded_at: Mon, 22 Apr 2024 12:17:40 GMT+recorded_with: VCR 6.2.0diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_parent.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_parent.ymlnew file mode 100644index 00000000000..193f0a947bd--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_parent.yml@@ -0,0 +1,147 @@+---+http_interactions:+- request:+ method: mkcol+ uri: https://nextcloud.local/remote.php/dav/files/admin/Folder/New%20Folder+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.2.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Security-Policy:+ - default-src 'none';+ Content-Type:+ - text/html; charset=UTF-8+ Date:+ - Mon, 22 Apr 2024 09:39:26 GMT+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Oc-Fileid:+ - 00000376ocirabgzify6+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.57 (Debian)+ Set-Cookie:+ - ocirabgzify6=8c80041145ec1e150bebb1a90cb3cad3; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=P8AdLTeRfLwXVVrog9NuJbm47Mt6vKwMCT9VZweEpUq5NkUR9JTQaSA8fy6HijKVYfbPdwiFVcU56vmwJgY0t38lQCFBnR%2B3k17Nqe2RcptagT8U6aFBXb8KjHk1QO5q;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8c80041145ec1e150bebb1a90cb3cad3;+ 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, ocirabgzify6=8c80041145ec1e150bebb1a90cb3cad3;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8c80041145ec1e150bebb1a90cb3cad3;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8c80041145ec1e150bebb1a90cb3cad3;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8c80041145ec1e150bebb1a90cb3cad3;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8c80041145ec1e150bebb1a90cb3cad3;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8c80041145ec1e150bebb1a90cb3cad3;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8c80041145ec1e150bebb1a90cb3cad3;+ path=/; secure; HttpOnly; SameSite=Lax+ X-Content-Type-Options:+ - nosniff+ X-Debug-Token:+ - G5c01AuhOu00ROtutc6H+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.16+ X-Request-Id:+ - G5c01AuhOu00ROtutc6H+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ Content-Length:+ - '0'+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Mon, 22 Apr 2024 09:39:26 GMT+- request:+ method: delete+ uri: https://nextcloud.local/remote.php/dav/files/admin/Folder/New%20Folder+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.2.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Security-Policy:+ - default-src 'none';+ Date:+ - Mon, 22 Apr 2024 09:39:26 GMT+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.57 (Debian)+ Set-Cookie:+ - ocirabgzify6=9d5c82d9a91cdd6c50da8dd72e255ee2; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=SfJvjrqcM4zR35%2BKz2xXQcydvsBFiaJm8CSSZWPtjNPNgkgqsiwTW29%2Frmr2NP21pZvZhGKVlqAXOKFBW1ztZH4aM7iAN6bMfgZhKsScHldY3MJpjN3UsMhypTeqFe8u;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=9d5c82d9a91cdd6c50da8dd72e255ee2;+ 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, ocirabgzify6=9d5c82d9a91cdd6c50da8dd72e255ee2;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=9d5c82d9a91cdd6c50da8dd72e255ee2;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=9d5c82d9a91cdd6c50da8dd72e255ee2;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=9d5c82d9a91cdd6c50da8dd72e255ee2;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=9d5c82d9a91cdd6c50da8dd72e255ee2;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=9d5c82d9a91cdd6c50da8dd72e255ee2;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=9d5c82d9a91cdd6c50da8dd72e255ee2;+ path=/; secure; HttpOnly; SameSite=Lax+ X-Content-Type-Options:+ - nosniff+ X-Debug-Token:+ - Skl6Bo6YIalyrmAbdjG2+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.16+ X-Request-Id:+ - Skl6Bo6YIalyrmAbdjG2+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Mon, 22 Apr 2024 09:39:26 GMT+recorded_with: VCR 6.2.0diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_parent_not_found.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_parent_not_found.ymlnew file mode 100644index 00000000000..4763ed992dc--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_parent_not_found.yml@@ -0,0 +1,77 @@+---+http_interactions:+- request:+ method: mkcol+ uri: https://nextcloud.local/remote.php/dav/files/admin/DeathStar3/New%20Folder+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.2.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 409+ message: Conflict+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Security-Policy:+ - default-src 'none';+ Content-Type:+ - application/xml; charset=utf-8+ Date:+ - Mon, 22 Apr 2024 09:41:52 GMT+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.57 (Debian)+ Set-Cookie:+ - ocirabgzify6=7c2e27d691e6c1d763ecbf32e028a74a; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=z8reMZxLaXjDi01xtRT3%2B6WEvbPmS1GZMsfNLd2%2B0sOlKCUGUV9%2BoKK2U7Cx%2Fjr%2B%2FtSYAXauHznH5g7TLKHoY7VHsQrwbHOh8z%2FNkRU76lOT03mCoB5CCfiSwJSE8lws;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=7c2e27d691e6c1d763ecbf32e028a74a;+ 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, ocirabgzify6=7c2e27d691e6c1d763ecbf32e028a74a;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=7c2e27d691e6c1d763ecbf32e028a74a;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=7c2e27d691e6c1d763ecbf32e028a74a;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=7c2e27d691e6c1d763ecbf32e028a74a;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=7c2e27d691e6c1d763ecbf32e028a74a;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=7c2e27d691e6c1d763ecbf32e028a74a;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=7c2e27d691e6c1d763ecbf32e028a74a;+ path=/; secure; HttpOnly; SameSite=Lax+ X-Content-Type-Options:+ - nosniff+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.16+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ Content-Length:+ - '218'+ body:+ encoding: UTF-8+ string: |+ <?xml version="1.0" encoding="utf-8"?>+ <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">+ <s:exception>Sabre\DAV\Exception\Conflict</s:exception>+ <s:message>Parent node does not exist</s:message>+ </d:error>+ recorded_at: Mon, 22 Apr 2024 09:41:52 GMT+recorded_with: VCR 6.2.0diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_root.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_root.ymlnew file mode 100644index 00000000000..b945b3a5768--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/create_folder_root.yml@@ -0,0 +1,147 @@+---+http_interactions:+- request:+ method: mkcol+ uri: https://nextcloud.local/remote.php/dav/files/admin/New%20Folder+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.2.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Security-Policy:+ - default-src 'none';+ Content-Type:+ - text/html; charset=UTF-8+ Date:+ - Mon, 22 Apr 2024 09:35:46 GMT+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Oc-Fileid:+ - 00000375ocirabgzify6+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.57 (Debian)+ Set-Cookie:+ - ocirabgzify6=8761b9e8d4568bfbfea71767bceb07ba; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=J9P8gQ6tPcwI9aBaromRubvXEOIw9n55xHeC9pieXS7dVkxR9GpfikzPc7CMyJM6Cs1hnPyYDql7u1ID%2Bd8JFkVTPMFZfKW%2BI%2FzvkI3OqyseTWmgu%2B6e7hdOS41EHbTK;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8761b9e8d4568bfbfea71767bceb07ba;+ 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, ocirabgzify6=8761b9e8d4568bfbfea71767bceb07ba;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8761b9e8d4568bfbfea71767bceb07ba;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8761b9e8d4568bfbfea71767bceb07ba;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8761b9e8d4568bfbfea71767bceb07ba;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8761b9e8d4568bfbfea71767bceb07ba;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8761b9e8d4568bfbfea71767bceb07ba;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=8761b9e8d4568bfbfea71767bceb07ba;+ path=/; secure; HttpOnly; SameSite=Lax+ X-Content-Type-Options:+ - nosniff+ X-Debug-Token:+ - RUTFlOAjyi4Z244Taqvh+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.16+ X-Request-Id:+ - RUTFlOAjyi4Z244Taqvh+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ Content-Length:+ - '0'+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Mon, 22 Apr 2024 09:35:47 GMT+- request:+ method: delete+ uri: https://nextcloud.local/remote.php/dav/files/admin/New%20Folder+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.2.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Security-Policy:+ - default-src 'none';+ Date:+ - Mon, 22 Apr 2024 09:35:47 GMT+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.57 (Debian)+ Set-Cookie:+ - ocirabgzify6=43fa9a24287eb4c8afaf266526f6bb0f; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=rDzNWMd4CaBBTiMZEDZiXb5PrqyBFy1Za57hRCCRW35ovn8YjynZ3j%2F94YoGQ%2BMjrhIENlTGE%2FybTUigMTK%2BlUZcqdvImLsmYHopmzzIYfyeWAJkugK2prW%2BpJsZYflL;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=43fa9a24287eb4c8afaf266526f6bb0f;+ 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, ocirabgzify6=43fa9a24287eb4c8afaf266526f6bb0f;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=43fa9a24287eb4c8afaf266526f6bb0f;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=43fa9a24287eb4c8afaf266526f6bb0f;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=43fa9a24287eb4c8afaf266526f6bb0f;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=43fa9a24287eb4c8afaf266526f6bb0f;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=43fa9a24287eb4c8afaf266526f6bb0f;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=43fa9a24287eb4c8afaf266526f6bb0f;+ path=/; secure; HttpOnly; SameSite=Lax+ X-Content-Type-Options:+ - nosniff+ X-Debug-Token:+ - yZbkVlNNUauhRpSmfYgH+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.16+ X-Request-Id:+ - yZbkVlNNUauhRpSmfYgH+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Mon, 22 Apr 2024 09:35:47 GMT+recorded_with: VCR 6.2.0diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/delete_folder.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/delete_folder.ymlnew file mode 100644index 00000000000..96494ffbaa8--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/delete_folder.yml@@ -0,0 +1,147 @@+---+http_interactions:+- request:+ method: mkcol+ uri: https://nextcloud.local/remote.php/dav/files/admin/To%20Be%20Deleted%20Soon+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.2.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 201+ message: Created+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Security-Policy:+ - default-src 'none';+ Content-Type:+ - text/html; charset=UTF-8+ Date:+ - Mon, 22 Apr 2024 09:14:21 GMT+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Oc-Fileid:+ - 00000374ocirabgzify6+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.57 (Debian)+ Set-Cookie:+ - ocirabgzify6=b9d5029ee8a149f8a2ae077ced606f68; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=4LnEWVfKVN6raZJTZwYHIGOFGRw55F0rlxCEDMsH6m0m6ZeQLjYVYYsG5u3Xbgl1Ls30a7OaZv8X1ltmaTB4%2BmZMLidD5wpZtQ2g0hI6r%2Fnm%2FO8R2YKa16hdMDeGblcc;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=b9d5029ee8a149f8a2ae077ced606f68;+ 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, ocirabgzify6=b9d5029ee8a149f8a2ae077ced606f68;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=b9d5029ee8a149f8a2ae077ced606f68;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=b9d5029ee8a149f8a2ae077ced606f68;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=b9d5029ee8a149f8a2ae077ced606f68;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=b9d5029ee8a149f8a2ae077ced606f68;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=b9d5029ee8a149f8a2ae077ced606f68;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=b9d5029ee8a149f8a2ae077ced606f68;+ path=/; secure; HttpOnly; SameSite=Lax+ X-Content-Type-Options:+ - nosniff+ X-Debug-Token:+ - dL2UCFlK7gavvQSBnnQc+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.16+ X-Request-Id:+ - dL2UCFlK7gavvQSBnnQc+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ Content-Length:+ - '0'+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Mon, 22 Apr 2024 09:14:21 GMT+- request:+ method: delete+ uri: https://nextcloud.local/remote.php/dav/files/admin/To%20Be%20Deleted%20Soon+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.2.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 204+ message: No Content+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Security-Policy:+ - default-src 'none';+ Date:+ - Mon, 22 Apr 2024 09:14:21 GMT+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.57 (Debian)+ Set-Cookie:+ - ocirabgzify6=a8f871f41dd15b68fcca3cb9827c5be6; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=lEjUBSTFPgOOsY3iAT8tNgqajjOG%2BqFO4bksX2tce%2B%2F28OI5s9t9biAZ8DEbuYtaBbHniSKWwrT9wbTKDXaBQpu9LZqT6OSAWrAhlKleGagKwWMtumFEcQmw1pPGl5sz;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=a8f871f41dd15b68fcca3cb9827c5be6;+ 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, ocirabgzify6=a8f871f41dd15b68fcca3cb9827c5be6;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=a8f871f41dd15b68fcca3cb9827c5be6;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=a8f871f41dd15b68fcca3cb9827c5be6;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=a8f871f41dd15b68fcca3cb9827c5be6;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=a8f871f41dd15b68fcca3cb9827c5be6;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=a8f871f41dd15b68fcca3cb9827c5be6;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=a8f871f41dd15b68fcca3cb9827c5be6;+ path=/; secure; HttpOnly; SameSite=Lax+ X-Content-Type-Options:+ - nosniff+ X-Debug-Token:+ - cj36skzpndysxquimX7O+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.16+ X-Request-Id:+ - cj36skzpndysxquimX7O+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ body:+ encoding: UTF-8+ string: ''+ recorded_at: Mon, 22 Apr 2024 09:14:21 GMT+recorded_with: VCR 6.2.0diff --git a/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/delete_folder_not_found.yml b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/delete_folder_not_found.ymlnew file mode 100644index 00000000000..b0d15c9c596--- /dev/null+++ b/modules/storages/spec/support/fixtures/vcr_cassettes/nextcloud/delete_folder_not_found.yml@@ -0,0 +1,77 @@+---+http_interactions:+- request:+ method: delete+ uri: https://nextcloud.local/remote.php/dav/files/admin/IDoNotExist+ body:+ encoding: US-ASCII+ string: ''+ headers:+ Authorization:+ - Bearer <BEARER TOKEN>+ User-Agent:+ - httpx.rb/1.2.4+ Accept:+ - "*/*"+ Accept-Encoding:+ - gzip, deflate+ response:+ status:+ code: 404+ message: Not Found+ headers:+ Cache-Control:+ - no-store, no-cache, must-revalidate+ Content-Security-Policy:+ - default-src 'none';+ Content-Type:+ - application/xml; charset=utf-8+ Date:+ - Mon, 22 Apr 2024 09:17:13 GMT+ Expires:+ - Thu, 19 Nov 1981 08:52:00 GMT+ Pragma:+ - no-cache+ Referrer-Policy:+ - no-referrer+ Server:+ - Apache/2.4.57 (Debian)+ Set-Cookie:+ - ocirabgzify6=694195c25dfcf14ddaf8e788ee2bb565; path=/; secure; HttpOnly; SameSite=Lax,+ oc_sessionPassphrase=DV%2F8xj6nADGr%2BgJxjxpqGqHSRZcaaj9ffJAMo75n5zY%2FfuoQMamUzZ80kMfgnVzaMeqhe67MiX90MiqC2bn2PwJudXoyfLZwpOorTFMpZ6Vr%2B9%2FyPa8VS7ZIrXpZq0wC;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=694195c25dfcf14ddaf8e788ee2bb565;+ 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, ocirabgzify6=694195c25dfcf14ddaf8e788ee2bb565;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=694195c25dfcf14ddaf8e788ee2bb565;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=694195c25dfcf14ddaf8e788ee2bb565;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=694195c25dfcf14ddaf8e788ee2bb565;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=694195c25dfcf14ddaf8e788ee2bb565;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=694195c25dfcf14ddaf8e788ee2bb565;+ path=/; secure; HttpOnly; SameSite=Lax, ocirabgzify6=694195c25dfcf14ddaf8e788ee2bb565;+ path=/; secure; HttpOnly; SameSite=Lax+ X-Content-Type-Options:+ - nosniff+ X-Frame-Options:+ - SAMEORIGIN+ X-Permitted-Cross-Domain-Policies:+ - none+ X-Powered-By:+ - PHP/8.2.16+ X-Robots-Tag:+ - noindex, nofollow+ X-Xss-Protection:+ - 1; mode=block+ Content-Length:+ - '241'+ body:+ encoding: UTF-8+ string: |+ <?xml version="1.0" encoding="utf-8"?>+ <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">+ <s:exception>Sabre\DAV\Exception\NotFound</s:exception>+ <s:message>File with name //IDoNotExist could not be located</s:message>+ </d:error>+ recorded_at: Mon, 22 Apr 2024 09:17:13 GMT+recorded_with: VCR 6.2.0