Skip to content

Commit

Permalink
Ocdav spaces aware (cs3org#2396)
Browse files Browse the repository at this point in the history
* allow sending path filter on ListStorageSpaces call

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* make sharesstorageprovider filter by nodeid

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* ocdax + spaces: introduce and refactor lookUpStorageSpacesForPath

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* make propfind spaces aware, still flaky, infinite depth commented for now

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add changelog

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* split lookup into two dedicated functions

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* make delete spaces aware

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* use explicit grant and mountpoint types

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* make ref debuggable

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* make dav get spaces aware

* fix requested path check

* refactor spaces handler to use mountpoint

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* make head spaces aware

* make mkcol spaces aware

* make move spaces aware

* make put spaces aware

* make proppatch spaces aware

* fix move: use dedicated intermediate resource

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* make copy spaces aware

* fix propfind for subfolders and subspaces

* add FIXMEs when using absolute references without an ID

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update config

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix propfind for subfolders

* change copy reference to spaces reference

* remove node via os instead tree when create fails

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* fix unit tests

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* fix linting

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* fix integration tests

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* pass opaque through gateway

* add option to return to do exact path matching

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* refine path matching logic

* send resourceid when stating parent

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* actually use space and shareid in sharesstorageprovider

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* add deepest mountpath in unique case

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* Add resourceid when stating in put handler

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* son't overwrite path on copy

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* implement depth=infinity logic

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* use relative path when stating parent

* refine IsSpaceRoot logic

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* linting

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* do not add child info when depth is 0

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* remove rename logic from gateway

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* remove path changing logic

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* fix some flakyness

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* don't send path when statting from sharesstorageprovider

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* refine logic when to send path on stat

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* fix panic in unit tests

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* add resourceid when purging recycle

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* add resourceid for other recycle endpoints too

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* lame way of fixing listrecycle

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* fix duplicates in propfind response

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix PROPFIND for subfolders

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix shared file aggregetion

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix litmus test setup

* continue on ListContainer errors

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix lint

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix depth infinity

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* use GetPath properly

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* prevent panic when owner is nil

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* work on public link access

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix webdav path copy

* fix public link listing

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix public link children

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* small public link size fix

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix webdav spaces mkcol

* fix webdav spaces delete

* work on depth infinity

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add userid to unittest mock

Signed-off-by: jkoberg <jkoberg@owncloud.com>

* work on etag propagation

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix mostRecentChild logic

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add missing license header

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix webdav spaces put and get

* fix spaces webdav endpoints

I removed the namespace from the spaces handlers again because the
namespace depends on the respective space.

* drop unnecessary GetPath call in public file PROPFIND

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix webdav spaces propfind href

* fix on public file propfind/get/head

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix makeRelativeReference

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix non existing rootinfo

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix makeRelativeReference for spaces webdav

* use relative path when copying

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* use source when listing while copying

Signed-off-by: jkoberg <jkoberg@owncloud.com>

Co-authored-by: David Christofas <dchristofas@owncloud.com>
Co-authored-by: jkoberg <jkoberg@owncloud.com>
  • Loading branch information
3 people authored Jan 4, 2022
1 parent d241ec5 commit 649b6a7
Show file tree
Hide file tree
Showing 36 changed files with 1,242 additions and 760 deletions.
9 changes: 9 additions & 0 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ def litmusOcisOldWebdav():
"/drone/src/cmd/revad/revad -c frontend.toml &",
"/drone/src/cmd/revad/revad -c gateway.toml &",
"/drone/src/cmd/revad/revad -c storage-users-ocis.toml &",
"/drone/src/cmd/revad/revad -c storage-shares.toml &",
"/drone/src/cmd/revad/revad -c storage-publiclink.toml &",
"/drone/src/cmd/revad/revad -c shares.toml &",
"/drone/src/cmd/revad/revad -c users.toml",
],
},
Expand Down Expand Up @@ -565,6 +568,9 @@ def litmusOcisNewWebdav():
"/drone/src/cmd/revad/revad -c frontend.toml &",
"/drone/src/cmd/revad/revad -c gateway.toml &",
"/drone/src/cmd/revad/revad -c storage-users-ocis.toml &",
"/drone/src/cmd/revad/revad -c storage-shares.toml &",
"/drone/src/cmd/revad/revad -c storage-publiclink.toml &",
"/drone/src/cmd/revad/revad -c shares.toml &",
"/drone/src/cmd/revad/revad -c users.toml",
]
},
Expand Down Expand Up @@ -618,6 +624,9 @@ def litmusOcisSpacesDav():
"/drone/src/cmd/revad/revad -c frontend.toml &",
"/drone/src/cmd/revad/revad -c gateway.toml &",
"/drone/src/cmd/revad/revad -c storage-users-ocis.toml &",
"/drone/src/cmd/revad/revad -c storage-shares.toml &",
"/drone/src/cmd/revad/revad -c storage-publiclink.toml &",
"/drone/src/cmd/revad/revad -c shares.toml &",
"/drone/src/cmd/revad/revad -c users.toml",
]
},
Expand Down
5 changes: 5 additions & 0 deletions changelog/unreleased/ocdav-spaces-aware.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Change: the ocdav handler is now spaces aware

It will use LookupStorageSpaces and make only relative requests to the gateway. Temp comment

https://github.com/cs3org/reva/pull/2396
Loading

0 comments on commit 649b6a7

Please sign in to comment.