Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] fix(sharing-ng): Add /graph/v1beta1/drives/{driveId}/root endpoints #8727

Merged
merged 12 commits into from
Apr 4, 2024

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Mar 25, 2024

Note to reviewers: This might be easier to review if you look at the separate commits instead of the huge diff of the full PR. (Most of the commits are just moving code around)

This adds support for the the following endpoints:

POST /drives/{driveID}/root/invite
POST /drives/{driveID}/root/createLink
GET /drives/{driveID}/root/permissions
DELETE/drives/{driveID}/root/permissions/{permissionID}
PATCH /drives/{driveID}/root/permissions/{permissionID}
POST /drives/{driveID}/root/permissions/{permissionID}/setPassword

Basically root works as an alias for the itemid of root item of a drive. So this should make it easier to deal with permissions on project spaces.

Apart from the above this PR does also quite a bit of refactoring, trying to move all permission related endpoints into separate service and splitting up the http request handling from the business logic. Which should make the code somewhat better to maintain and test. (there is still a lot of room for improvement though).

@rhafer rhafer self-assigned this Mar 25, 2024
Copy link

update-docs bot commented Mar 25, 2024

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@rhafer rhafer force-pushed the issue/8351 branch 9 times, most recently from 928a59d to a9b6246 Compare March 27, 2024 18:37
@rhafer rhafer changed the title fix(sharing-ng): Add /graph/v1beta1/drives/{driveId}/root endpoints [full-ci] fix(sharing-ng): Add /graph/v1beta1/drives/{driveId}/root endpoints Mar 27, 2024
@rhafer rhafer marked this pull request as ready for review March 27, 2024 19:40
@rhafer rhafer requested a review from fschade March 27, 2024 19:40
@rhafer rhafer force-pushed the issue/8351 branch 2 times, most recently from e131ce1 to 888012f Compare April 3, 2024 12:34
rhafer added 5 commits April 4, 2024 11:43
This introduces the new DriveItemPermissionsService and DriveItemPermissionsApi to
allow for better separation of the business logic and the API handling.

As a starting point the Invite method was moved to the new service. More to follow.
… methods

BaseGraphService is a struct to hold common fields and methods that can be
share between different service implementations. E.g. for converting CS3 objects
to their libregraph equivalents.
Copy link
Collaborator

@kobergj kobergj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly the hound in me speaking 🙈 🐕‍🦺

rhafer added 6 commits April 4, 2024 13:38
This add support for the following graph routes:

POST /drives/{driveID}/root/createLink
DELETE /drives/{driveID}/root/permissions/{permissionID}
PATCH /drives/{driveID}/root/permissions/{permissionID}
and
POST /drives/{driveID}/root/permissions/{permissionID}/setPassword

This should significantly improve handling of permissions on spaces
as there is no need to figure to the drive's root itemid anymore.

Partial Fix: owncloud#8351
Copy link
Collaborator

@kobergj kobergj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

The default (10) seems somewhat low.
Copy link

sonarqubecloud bot commented Apr 4, 2024

@rhafer rhafer merged commit c7303eb into owncloud:master Apr 4, 2024
3 checks passed
@rhafer rhafer deleted the issue/8351 branch April 4, 2024 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants