Commit Graph

2145 Commits

Author SHA1 Message Date
Ralf Haferkamp
92b1f768b4 fix: Remove unneeded code
errors.Join(errs...) ignores nil errors and returns nil if there are not errors.

(cherry picked from commit f5a282c13e4245fb29e7e7217889878a4efb99ce)
2024-02-28 17:42:54 +01:00
Ralf Haferkamp
696b7b7a8d enhancement(sharing): Check driveID when unmounting share
Only accept requests against the shareJail driveID

(cherry picked from commit 64f6c147dd55f1ede79f1709e09817939fcc4387)
2024-02-28 17:42:54 +01:00
Ralf Haferkamp
693bc7b38f Fix typos
(cherry picked from commit 10babaf4c527d91825f70cea68065f44dc01b8da)
2024-02-28 17:42:54 +01:00
Ralf Haferkamp
bb5e1bac35 enhancement(sharing): allow unmounting a share
(cherry picked from commit 35acae10a3d1a7370115f3444e433af2df7e5346)
2024-02-28 17:42:54 +01:00
Ralf Haferkamp
ebcca0e678 enhancement(sharing): Return newly created driveItem
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)
2024-02-28 17:42:54 +01:00
Ralf Haferkamp
d005bb858b enhancement(sharing): Simplify route for accepting shares
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)
2024-02-28 17:42:54 +01:00
Ralf Haferkamp
e959faf9da enhancement(graph): refrain from registering routes via the Router interface
After some back an forth we agreed on keeping the routes defined
in a central place for now.

(cherry picked from commit e7985f42b6edf92f0a4344d4f3f8c5e28c23e276)
2024-02-28 17:42:54 +01:00
Ralf Haferkamp
059a77edf3 fix(graph): Remove duplicated routes from router
(cherry picked from commit 54226aee7b594524967a470fcdfa51d66ff8abfd)
2024-02-28 17:42:54 +01:00
Florian Schade
321c692ff4 test: add more tests for the DrivesDriveItemService implementation
(cherry picked from commit d48da968af116102b21f1f4397d3f589adbc8ce1)
2024-02-28 17:42:54 +01:00
Florian Schade
c5bdc5d595 test: improve graph share accept/decline test coverage
(cherry picked from commit 5c3972530eb19a27f24ecfcb7ff0f42682e7b49c)
2024-02-28 17:42:54 +01:00
Florian Schade
8d5beee430 enhancement: add DrivesDriveItemApi DeleteDriveItem tests
(cherry picked from commit c10d7dd84bd3cda0270f25356b9931c47be7b889)
2024-02-28 17:42:54 +01:00
Florian Schade
43a6d5569f enhancement: add basic share unmount
(cherry picked from commit 877f233bf1d40346f3cb5e2114b5cd0fb464b460)
2024-02-28 17:42:54 +01:00
Florian Schade
a61adbc85b enhancement: handle share mount errors
(cherry picked from commit 92fc17d1bbc9b7d094fa89f7553aa4f11cc42f3d)
2024-02-28 17:42:54 +01:00
Florian Schade
cb43cbaee4 enhancement: make use of body driveItem for graph share accept
(cherry picked from commit 796233c8d5a03f90ec49bf6cc2737036373e616d)
2024-02-28 17:42:54 +01:00
Florian Schade
50ea1f46e7 enhancement: add basic share accept feature, error handling and detailed implementation still missed
(cherry picked from commit a5b70b3d7a7d4471f97643e5a6ad0a4de12f2b03)
2024-02-28 17:42:54 +01:00
Florian Schade
7e07254556 feature(sharing): add endpoints to accept or decline a share
(cherry picked from commit 795d0fcc619947db135025191b421bf5dac20e5e)
2024-02-28 17:42:54 +01:00
Jörn Friedrich Dreyer
db727ef89c make julianlint happy
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-28 10:41:12 +01:00
Jörn Friedrich Dreyer
1e074732be add missing package
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-28 10:41:12 +01:00
Jörn Friedrich Dreyer
d61bf7404b no longer autostart store
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-28 10:41:12 +01:00
Jörn Friedrich Dreyer
c79f206d50 Make presigned key store configurable
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-28 10:41:12 +01:00
ownClouders
ee501f225e [tx] updated from transifex 2024-02-23 00:47:43 +00:00
ownClouders
2a300190cb [tx] updated from transifex 2024-02-22 03:58:21 +00:00
Ralf Haferkamp
b6fea0faed [full-ci] fix(sharing-ng): align sharedWithMe driveItem IDs with PROPFIND response (#8467)
* 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
2024-02-21 13:25:49 +01:00
Jörn Friedrich Dreyer
5ed57cc09a Bump reva deps (#8412)
* bump dependencies

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

* bump reva and add config options

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

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-21 10:20:36 +01:00
Benedikt Kulmann
6d9e23d6cd chore: bump web to v8.0.0-rc.5 2024-02-20 19:40:59 +01:00
Jörn Friedrich Dreyer
bc48fbdf81 Deprecate sharing cs3 backends (#8478)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-19 12:49:08 +01:00
ownClouders
cc18f5c372 [tx] updated from transifex 2024-02-19 04:30:50 +00:00
ownClouders
e6e9e7a88c [tx] updated from transifex 2024-02-17 00:47:34 +00:00
Benedikt Kulmann
4a28cee0f7 chore: bump web to v8.0.0-rc.4 2024-02-15 21:16:45 +01:00
ownClouders
5911f354be [tx] updated from transifex 2024-02-15 01:15:35 +00:00
Sawjan Gurung
911754fd42 fix: bulky error message for invalid search request (#8444) 2024-02-13 15:58:26 +05:45
ownClouders
620195dfe0 [tx] updated from transifex 2024-02-13 06:54:04 +00:00
Ralf Haferkamp
3d3f8949f5 Bump mockery to 2.40.2
to address issues when building with go1.22:
https://github.com/vektra/mockery/pull/753
2024-02-09 11:48:45 +01:00
Roman Perekhod
fb5f29c537 fix the bug when the expiration dates can't be removed from link permissions 2024-02-09 10:38:40 +01:00
Roman Perekhod
17a799c1fa fix search response 2024-02-09 09:39:07 +01:00
ownClouders
9414f732d7 [tx] updated from transifex 2024-02-08 01:10:30 +00:00
Thomas Müller
b12cff1016 fix: properly check expiry and verify signature of signed urls (#8385)
fix: signed url expiry validation only checks for expiry and not for used before
2024-02-07 15:44:33 +01:00
jkoberg
6487ed7101 userlog: send only one SSEEvent per language
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-02-07 09:42:37 +01:00
Florian Schade
0fd7f50ccb enhancement: allow sending multiple userIDs in one SSE event 2024-02-07 09:42:37 +01:00
mmattel
6e721eb4f5 [docs-only] Fix envvar descriptions trailing a double dot 2024-02-06 11:52:10 +01:00
ownClouders
4d5490a601 [tx] updated from transifex 2024-02-03 00:37:35 +00:00
Michael Barz
e22dce40ff Merge pull request #8303 from owncloud/remove-spaces-config-options
fix: hardcode config for spaces which was not allowed to change
2024-02-02 10:22:00 +01:00
Benedikt Kulmann
5f7f57ab27 Merge pull request #8342 from owncloud/bump-web-8.0.0-rc.3
[full-ci] chore: bump web to v8.0.0-rc.3
2024-02-02 06:14:25 +01:00
ownClouders
241b41848c [tx] updated from transifex 2024-02-02 01:10:41 +00:00
Ralf Haferkamp
07860ef8e7 Fix some fallout of recent mockery changes (#8341)
* 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
2024-02-01 21:09:01 +01:00
Benedikt Kulmann
c31b4546d4 chore: bump web to v8.0.0-rc.3 2024-02-01 16:39:48 +01:00
Ralf Haferkamp
36eff3b280 graph/sharedWithMe: Fix 'createdBy' attribute for resources from project spaces
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
2024-02-01 15:38:55 +01:00
Ralf Haferkamp
857125577f graph/sharedWithMe: return shares for the same resource as a single driveItem
- 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.
2024-02-01 15:38:55 +01:00
Ralf Haferkamp
8e01d58909 graph/sharedWithMe: Adjust the driveItem's ID once more
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})
2024-02-01 15:38:55 +01:00
Jörn Friedrich Dreyer
fad94d2038 bump mockery, add test stub for oidc_auth.go, align mock generation (#8321)
* 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>
2024-02-01 10:07:44 +01:00