Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Do not allow cross-storage restores * Fix expected failures for s3ng * Be more robust when handling error cases * WIP: Fix restoring recycle items * Fix unit tests * Fix license headers * Fix linter issues * move unwrapping and wrapping of paths to the gateway temporary change to check CI * minimal space provider and registry prototypes Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add missing go.sum entry Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix import Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add embedded mounts when listing /home Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * remove unexpected passes Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use space registry to manage aliases Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add changelog * add old logic as comment as we want to bring parts of it back for OCM Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * further work Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix access vi space & path Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * register /home as path alies for the users personal space Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update toml files Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * rewrite gateway Stat() Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * rewrite ListContainer() Co-authored-by: David Christofas <C0rby@users.noreply.github.com> Co-authored-by: jkoberg <jkoberg@owncloud.com> Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * return not found Status instead of error Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add comment Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix create container Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * introduce findAndUnwrap Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * internally use spaces instead of simple download protocol Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix drone pipeline Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix litmus on spaces Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * check if parent exists in decomposedfs Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * align local frontend config with drone Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix move Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix copy Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * spaces provider is no longer needed Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * don't discards absolute pathes on providers * add DeleteStorageSpace to internal storage interface Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * sharesstorageprovider: implement ListStorageSpaces * tune ListContainer Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fine tune spaces registry Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * drop mount_id config, fix decomposedfs shares spaces Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * try fixing shares Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix shares Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * also wipe spaces when deleting users Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * try with empty quota Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add NewErrtypeFromStatus() helper Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make decomposedfs use nodeid as spaceid, hide spaces of type share Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * align and refactor Stat and ListContainer Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make sharesstorageprovider list each share as a space Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make spaces registry stat resource id instead of calling list spaces Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * sharesstorageprovider align stat & list Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * register shares spaces as /home/Shares/{name} Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * refactor sharesstorageprovider Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add TODO Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make gateway storageprovider return correct type on stat Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix path when listing unacceptaed shares Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add public function commend fort hound Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make gateway handle absolute id based stats correctly Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make spaces registry use configured provider path in id based requests Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update combined.toml Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * drop gateway storage_rules Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix stat to root of space and absolute id Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * better handle relative references Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * revert path mangling for unaccepted shares Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * cleanup toml config Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * remove stale TODO Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * avoid caching sideeffects for now Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * try cleaner responsibilities Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * always send spaceid!nodeid in storagespaceid Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix spaces litmus tests Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make hound happy Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix spaces GET Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix up & download into shares Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * send space type when resolving id based request Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix public share listing Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix create container on public share Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use reference for internal recycle api Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix shares Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * allow CurrentUser and Space in space registry template Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * ignore error when unsetting a not existing favorite flag Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update path in dav report comment Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * only list spaces as nodes if no matches were found Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * create a copy of the reference to prevent losing the original Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * get rid of /home mountpoint to make paths unique we may have two providers: /home and /users/u-u-i-d for an id based request which one do we pick? we may end up with /dav/files/marie/f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c/PARENT/ in a REPORT https://cloud.ocis.test/dav/files/marie depending on the order we may pick f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c/PARENT/ over just /PARENT the /dav/files andpoint is configured to use the use id: "/users/{{.Id.OpaqueId}}" but the REPORT does not truncate it? how can the report search properly? with a relative request? no that would cut off the mount point the problem is there may be two mount points -> how can we get rid of that? no /home provider gateway GetHome should return "/users/{{.Id.OpaqueId}}" frontend uses "/users/{{.Id.OpaqueId}}" instead of "/home" for "/webdav" Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add template to ocs home namespace Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * id based requests must be forwarded as is * decomposedfs: fix spaces root * fix public path_template * correct config Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * decomposedfs: add missing error check * allow sending uuid in createspace Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix drone config * remove unexpected passes Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add xattrs.CopyMetadata() function Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * when constructing a folder wipe checksums from metadata Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * align sharesstorageprovider up & download Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * drop unused local toml config Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * decomposedfs: copy metadata from old to new revision Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix loop when downloading from a share Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix npe when no checksim is set Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix renaming share Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make resharing possible * work on ocs share paths Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * cut off path of received shares Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * work on ocs shares paths Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use space id when listing trash Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * set name when err == nil Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use spaceid instead of owner id when deleting a resource Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix pending share path Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * unmount share on delete Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * wrap trash item paths correctly in the gateway * the trash key contains root node and relative path * unprefix trash item path in ocdav * fix listing recycle in decomposedfs * add docs to public CopyMetadata() Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix renaming shares * wrap path in share response Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * wrap path in more share responses Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix public storage spaces path_template Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * omit virtual spaces config for now Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * omit PUT request for empty files * Do not try to walk an empty path * publicstorageprovider: do not prefix relative path to ListContainer items Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * publicstorageprovider: fix id based stat Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * return expected xml error on public link auth errors Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix sharesstorageprovider unit tests * fix file_target Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * unwrap permission error from scope Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix sharing unit tests * forward recycle item key when purging Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * work on decomposedfs tree tests Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix chunked upload Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * refactor gateway RestoreRecycleItem Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix trash restore Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * return ocs body on error when stating during create share Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * remove unexpected passes Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * render xml when resoucre not found on /dav/meta Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * Add grpc integration tests for the gateway * skip spaces tests and fix tree_test * when resource has same storageid delegate MOVE decision Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make content disposition reflect request base path Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * remove EnableHome from decomposedfs * make unit tests presumably green * remove home references from decomposedfs * use exact path match to find responsible ListRecycle provider Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix log typo Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix finding correct recycle source provider Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix restore ref unwrapping Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * align expected failures Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix decomposedfs/node unit tests * fix decomposedfs/tree unit tests * fix decomposedfs unit tests * fix decomposedfs concurrency unit tests * look up home provider from gateway Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make the linter happy * make build work again * make linter even more happy * more linting fixes * add even more linting fixes * fix trash item lookup Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * cache spaceid -> provider lookup Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * actually cache providers Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * first round of integration test fixes * get rid of old cache in spaces registry Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * don't use custom tempdir for integration tests * fix linter, add mount point caching thoughts Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix log typo Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update spaces Readme Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * comment unused mount cache for now Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * integration test fixes part II * fix restore logic in decomposedfs * fix ocis integration tests * Add gateway integration tests for sharded directories * Start refactoring spaces registry, bring back unit tests * fix spaces registry tests Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make storageregistry service use new internal interface Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * commant internal storage registry interface Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * Bring back support for id based requests * adjust gateway to new registry API Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make static registry compatible with new gateway Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix findAndUnwrap Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * make hound happy again Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * send mount path in GetProvider response Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add naming comment Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix path in stat response for id based requests Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * experimental fix for integration tests * sharpen unwrap logic * attempt to fix the problem + probdescription * more sophisticated way of determining the root * add same logic to recycle operations * fix stat file type mount points Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * Streamline tests, increase coverage * Increase test coverage * comment cleanup Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix ListStorageSpace to contain correct spaceid Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix linting & hound * fix linting issues * log correct call Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * extract ref from opaque for public link scope Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix publiclink corner cases and scope Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * Clarify spaces registry configuration The new structure uses a providers map instead of a rules map with the provider address being the key. That makes things more clear and prevents bad configuration with the same provider being mounted at diffferent locations. * update expected failures Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fixing gateway.RestoreTrashItem Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * Remove programmatic test focus * refactor utils.SplitStorageSpaceID Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * forbid cross provider RestoreRecycleItem Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix relative references in space registry Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * refactor integration tests * fallback to CreateHome, deprecate GetHome Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * Fix CreateHome/GetHome when using the static registry * update cache notes Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * rename spaces registry rule struct to provider Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add a Stat cache to the gateway * also activate the cache * fix build after master merge * fix integration tests (again) * Allow read access to the root node * Add grpc integration tests for the virtual views case * disable cache for now Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add comment to PublicStorageProviderID Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix sharing Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix unit tests (again) * fix 0 byte uploads Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix concurrency tests (again) * add license header for storageprovidercache * no longer wipe storage after every test Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * fix linting (again) * Fix integration tests * make codacy happy * Revert "no longer wipe storage after every test" This reverts commit 00f4942. * make codacy happy (part II) * make codacy happy (part III) * virtual views pipeline is covered by tests/integration/grpc/gateway_storageprovider_static_test.go Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> Co-authored-by: André Duffeck <andre.duffeck@firondu.de> Co-authored-by: David Christofas <dchristofas@owncloud.com> Co-authored-by: jkoberg <jkoberg@owncloud.com>
- Loading branch information