Commit Graph

522 Commits

Author SHA1 Message Date
kobergj
e2eed1a3ca Merge pull request #8723 from kobergj/SpaceTemplatesII
Server-Side Space Templates
2024-03-28 11:56:15 +01:00
Jannik Stehle
035b34dff5 Merge pull request #8743 from owncloud/adjust-sharing-ng-role-names
refactor: adjust sharing ng role names and descriptions
2024-03-27 18:09:42 +01:00
Florian Schade
25b40cf7a3 fix: make use of ResourcePermissions getters 2024-03-27 16:02:44 +01:00
jkoberg
24b5f8547a allow using custom lang for space templates
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-03-27 10:56:43 +01:00
Viktor Scharf
79c74711c4 [full-ci] Delete resharing tests (#8704)
* feat: disable resharing by default

delete re-sharing tests

* fix tests

---------

Co-authored-by: Michael Barz <mbarz@owncloud.com>
2024-03-27 10:30:25 +01:00
Jannik Stehle
2968570a84 refactor: adjust sharing ng role names and descriptions
Adjusts display names and descriptions of sharing NG roles to align with the previously agreed upon terms.
2024-03-27 09:59:55 +01:00
jkoberg
e0a27713cb add random file to keep locale folder
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-03-26 15:27:15 +01:00
jkoberg
db346dff10 make readmes translateable
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-03-26 13:35:07 +01:00
jkoberg
1bc59de021 fix graph tests
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-03-26 10:41:42 +01:00
Ralf Haferkamp
352d60a931 feat(sharing-ng): Support for updating space permissions
PATCH request on a space's root drive item should work now
2024-03-25 12:30:33 +01:00
Ralf Haferkamp
dd2d6f4f85 feat(sharing-ng): Add support for deleting space permissions 2024-03-25 12:30:33 +01:00
Ralf Haferkamp
a5287af3bd fix(sharing-ng): Set permission id on space invitation response
When inviting a user to a space we now generate permission ids (based on
the invited user's/group's id)
2024-03-25 12:30:33 +01:00
jkoberg
0567dc4f70 use correct spaceimage
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-03-25 12:27:14 +01:00
jkoberg
9785c6ba14 fix quota response on createdrive
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-03-25 12:26:35 +01:00
Roman Perekhod
246f7bf538 internal links shouldn't have a password (#8668)
* internal links shouldn't have a password

* commented out incorrect cases
2024-03-18 15:23:10 +01:00
Ralf Haferkamp
dcdbfd81d4 chore: rework cs3ReceivedSharesToDriveItems to make linter happy 2024-03-18 11:53:57 +01:00
Ralf Haferkamp
2352145b98 graph(sharing-ng): Permission on Spaceroots need to have an id
In order to work with (e.g. get/delete) permissions granted to space
we need to give them a stable id. As the CS3 API don't provide an id
we generate it base on the id of the identity that the permission applies
to. For users we use "u:<userid>" for groups "g:<groupid>".

Closes: #8352
2024-03-18 11:53:57 +01:00
Ralf Haferkamp
a326d95232 enhancement(sharing): Return space permissions when looking up space root
Partial-Fix: #8352
2024-03-18 11:53:57 +01:00
Ralf Haferkamp
0f33c7ae96 enhancement(graph): cs3PermissionsToLibreGraph can also return v1beta1 format
This reworks the cs3PermissionsToLibreGraph() so that it is able to return
the libreGraph.Permissions in the legacy and the new v1beta1 format. The main
differences between both are that v1beta1 returns the identities in the
'grantedToV2' property and the 'roles' are returned as IDs instead of the
legacy role names.
2024-03-18 11:53:57 +01:00
Ralf Haferkamp
8fdfa1aee7 enhancement(graph): Remove unneded Coowner Role
This role was renamed to "Manager" a while ago.
2024-03-18 11:53:57 +01:00
mmattel
f44e48e9e3 Add deprecation info for resharing
Co-authored-by: Christian Richter <crichter@owncloud.com>
2024-03-15 10:21:57 +01:00
jkoberg
a0e2648200 get template from request
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-03-07 13:01:51 +01:00
jkoberg
edbc82bfc1 poc: server side space defaults
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2024-03-07 13:01:51 +01:00
Phil Davis
bfca242f2e chore: set introductionVersion 5.0 in services/graph 2024-03-06 17:50:21 +05:45
Phil Davis
9d2be66a85 chore: add introductionVersion pre5.0 to environment variable docs 2024-03-06 17:50:20 +05:45
Jörn Friedrich Dreyer
2dce3e997d Merge pull request #8546 from owncloud/verify-service-accounts-are-set
verify all system accounts are set
2024-02-29 17:29:08 +01:00
Jörn Friedrich Dreyer
972adafd29 verify all system accounts are set
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-29 15:51:37 +01:00
Ralf Haferkamp
0d366a33ae docs: Add missing doc comments 2024-02-28 17:29:04 +01:00
Ralf Haferkamp
1a8b0ea846 fix: Remove unneeded code
errors.Join(errs...) ignores nil errors and returns nil if there are not errors.
2024-02-28 17:29:04 +01:00
Ralf Haferkamp
1ceba732c2 enhancement(sharing): Check driveID when unmounting share
Only accept requests against the shareJail driveID
2024-02-28 17:29:04 +01:00
Ralf Haferkamp
83f9db3152 Fix typos 2024-02-28 17:29:04 +01:00
Ralf Haferkamp
9d6ece9220 enhancement(sharing): allow unmounting a share 2024-02-28 17:29:04 +01:00
Ralf Haferkamp
9d321bf379 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.
2024-02-28 17:29:04 +01:00
Ralf Haferkamp
0a24f23164 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.
2024-02-28 17:29:04 +01:00
Ralf Haferkamp
f86bd76e23 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.
2024-02-28 17:29:04 +01:00
Ralf Haferkamp
d418864f84 fix(graph): Remove duplicated routes from router 2024-02-28 17:29:04 +01:00
Florian Schade
35817f24f2 test: add more tests for the DrivesDriveItemService implementation 2024-02-28 17:29:04 +01:00
Florian Schade
0bd97c9178 test: improve graph share accept/decline test coverage 2024-02-28 17:29:04 +01:00
Florian Schade
7384297728 enhancement: add DrivesDriveItemApi DeleteDriveItem tests 2024-02-28 17:29:04 +01:00
Florian Schade
6278273d5e enhancement: add basic share unmount 2024-02-28 17:29:04 +01:00
Florian Schade
cad0d944eb enhancement: handle share mount errors 2024-02-28 17:29:04 +01:00
Florian Schade
5f705c6263 enhancement: make use of body driveItem for graph share accept 2024-02-28 17:29:04 +01:00
Florian Schade
1178491710 enhancement: add basic share accept feature, error handling and detailed implementation still missed 2024-02-28 17:29:04 +01:00
Florian Schade
91f0667f1f feature(sharing): add endpoints to accept or decline a share 2024-02-28 17:29:04 +01: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
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
mmattel
6e721eb4f5 [docs-only] Fix envvar descriptions trailing a double dot 2024-02-06 11:52:10 +01: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
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