diff --git a/apps/workflowengine/lib/Check/FileSystemTags.php b/apps/workflowengine/lib/Check/FileSystemTags.php index eafd4e97b40..1cc9509ba81 100644 --- a/apps/workflowengine/lib/Check/FileSystemTags.php +++ b/apps/workflowengine/lib/Check/FileSystemTags.php @@ -68,11 +68,6 @@ class FileSystemTags implements ICheck, IFileCheck { * @return bool */ public function executeCheck($operator, $value) { - if (str_starts_with($this->path, '__groupfolders')) { - // System tags are always empty in this case and executeCheck is called - // a second time with the jailedPath - return false; - } $systemTags = $this->getSystemTags(); return ($operator === 'is') === in_array($value, $systemTags); } diff --git a/lib/private/Files/Storage/Wrapper/Wrapper.php b/lib/private/Files/Storage/Wrapper/Wrapper.php index 61e10262f8b..d87922c8c3e 100644 --- a/lib/private/Files/Storage/Wrapper/Wrapper.php +++ b/lib/private/Files/Storage/Wrapper/Wrapper.php @@ -485,7 +485,7 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea /** * Check if the storage is an instance of $class or is a wrapper for a storage that is an instance of $class * - * @param string $class + * @param class-string $class * @return bool */ public function instanceOfStorage($class) { @@ -496,6 +496,25 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea return is_a($this, $class) or $this->getWrapperStorage()->instanceOfStorage($class); } + /** + * @template T of IStorage + * @param class-string $class + * @return ?T + */ + public function getInstanceOfStorage(string $class): ?IStorage { + $storage = $this; + while ($storage->instanceOfStorage(Wrapper::class)) { + if ($storage instanceof $class) { + break; + } + $storage = $storage->getWrapperStorage(); + } + if (!is_a($storage, $class)) { + return null; + } + return $storage; + } + /** * Pass any methods custom to specific storage implementations to the wrapped storage *