Переглянути джерело

Merge pull request #45008 from nextcloud/backport/44892/stable25

[stable25] fix(files): Also skip cross storage move with access control
Joas Schilling 1 місяць тому
батько
коміт
35baf71b91
1 змінених файлів з 3 додано та 0 видалено
  1. 3 0
      lib/private/Files/Storage/Local.php

+ 3 - 0
lib/private/Files/Storage/Local.php

@@ -558,11 +558,14 @@ class Local extends \OC\Files\Storage\Common {
 	}
 
 	private function canDoCrossStorageMove(IStorage $sourceStorage) {
+		/** @psalm-suppress UndefinedClass */
 		return $sourceStorage->instanceOfStorage(Local::class)
 			// Don't treat ACLStorageWrapper like local storage where copy can be done directly.
 			// Instead, use the slower recursive copying in php from Common::copyFromStorage with
 			// more permissions checks.
 			&& !$sourceStorage->instanceOfStorage('OCA\GroupFolders\ACL\ACLStorageWrapper')
+			// Same for access control
+			&& !$sourceStorage->instanceOfStorage(\OCA\FilesAccessControl\StorageWrapper::class)
 			// when moving encrypted files we have to handle keys and the target might not be encrypted
 			&& !$sourceStorage->instanceOfStorage(Encryption::class);
 	}