When accepting a share via 'POST /v1beta1/drives/{driveId}/root/children'
return the newly created driveItem. This driveItem wraps the accepted
remoteItem representing the shared resource (similar to the
'sharedWithMe' response.
This also refactors some of the helpers for user lookup and CS3 share to
driveItem conversion so they can be more easily shared.
(cherry picked from commit 7edc2febba4cd039c885a748d8f0e70610c2a147)
In theory creating the driveItem to accepting a shared resource
can be done via '/v1beta1/drives/{drive-id}/item/{item-id}/children'
but there is also the simplified variant via
'/v1beta1/drives/{drive-id}/root/children' (aligned with the example
in the spec). For now we'll just implement the latter because accepting
a share will always be done via root of the sharejail drive.
(cherry picked from commit c8a89e92f1ad662b6931bd8089795228e8492ae6)
After some back an forth we agreed on keeping the routes defined
in a central place for now.
(cherry picked from commit e7985f42b6edf92f0a4344d4f3f8c5e28c23e276)
* Bump reva
Fixes: #8080
* fix(sharing-ng): align sharedWithMe driveItem IDs
The IDs of the driveItems returned by the 'sharedWithMe' endpoint
should match the ids returned by the webdav PROPFIND response on
the share jail.
Fixes: #8420
* Fix mockery setup for graph service
Add missing interfaces to .mockery.yaml. Use existing mocks from protogen
where possible. Remove remaining //go:generate call.
* Add mockery config for settings service
* Add mockery config for proxy service
Don't return a meaningless userid anymore for shares created from files or directories
in a project space. These resources don't have a real owner.
Fixes: #8314
- multiple shares for the same resource are now returned as a single driveItem
- the id for that driveItem is for now based on the resourceId of the shared item
{sharesstorageproviderid}${sharejailid}!{resourceid of shared item}
- each share is exposed as a separate permission on the remoteId
- the permission now has an invitation property which provides the id of the creator
of the share
- the client.synchronize flag is now exposed on the top-level driveitem. If at
least on share of a resource is in accepted state the client.synchronize flag
will be set to true.
- the UI.Hidden flag is now exposed on the top-level driveitem. If at least on
share of a resource is marked as hidden the UI.Hidden flag will be set to
true.
- the 'shared' property is no longer available (the relevant information from that
moved to the 'invitation' property of the individual permissions.
In order to be able to group shares received for the same resource in a single driveItem
the driveItem's ID needs to be unrelated to the underlying shares' ids. We decided to base
it off of the shared resource's id (currently
{sharesstorageproviderid}${sharejailid}!{resourceid of shared item})
* bump mockery, add test stub for oidc_auth.go
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
* use .mockery.yaml for all mocks
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
* drop legacy go:generate mockery
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
* align mock placement
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
---------
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>