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

graph: update permissions #7860

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Nov 30, 2023

This is an initial implementation of PATCH support on drives/{driveid}/items/{itemid}/permissions/{id}.
It focusses on updating user shares for now. It's possible to update the expirationDate, roles and/or libregraphResourceActions.

Updating the permissions of a space root or a public link share is currently not implemented. Both should come with a follow up PR.

Somehow the usershareprovider is also still lacking checks if the sharer is actually allowed to set the requested permissions (e.g. when re-sharing). Still need to investigate that, but that something for a reva PR.

@rhafer rhafer self-assigned this Nov 30, 2023
Copy link

update-docs bot commented Nov 30, 2023

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 graph-update-permissions branch from 211e98d to 7f3354b Compare December 5, 2023 16:31
@rhafer
Copy link
Contributor Author

rhafer commented Dec 5, 2023

needs: cs3org/reva#4388

@rhafer rhafer mentioned this pull request Dec 5, 2023
22 tasks
@rhafer rhafer force-pushed the graph-update-permissions branch 3 times, most recently from 6d1b7e3 to f70c415 Compare December 7, 2023 15:42
@rhafer rhafer changed the title [wip] graph: update permissions graph: update permissions Dec 7, 2023
@rhafer rhafer marked this pull request as ready for review December 8, 2023 07:55
@rhafer rhafer force-pushed the graph-update-permissions branch from f70c415 to 3591d64 Compare December 8, 2023 08:31
Copy link
Contributor

@micbar micbar left a comment

Choose a reason for hiding this comment

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

Some nitpicks

services/graph/pkg/service/v0/driveitems.go Outdated Show resolved Hide resolved
services/graph/pkg/service/v0/driveitems.go Outdated Show resolved Hide resolved
Copy link
Contributor

@micbar micbar left a comment

Choose a reason for hiding this comment

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

Approved with the required changes.

@rhafer rhafer force-pushed the graph-update-permissions branch from 3591d64 to 6c63803 Compare December 8, 2023 08:42
@micbar micbar enabled auto-merge December 8, 2023 08:49
Otherwise errorcode.RenderError() will not render the correct HTTP Status
This is an initial implementation of PATCH support on drives/{driveid}/items/{itemid}/permissions/{id}.
It focusses on updating user shares for now. It's possible to update the
expirationDate, roles and/or libregraphResourceActions.
Updating the permissions of a space root or a public link share is currently
not implemeted.
@rhafer rhafer force-pushed the graph-update-permissions branch from 6c63803 to 269ce60 Compare December 8, 2023 09:55
Copy link

sonarqubecloud bot commented Dec 8, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

76.5% 76.5% Coverage
0.0% 0.0% Duplication

@micbar micbar merged commit 99fb7a2 into owncloud:master Dec 8, 2023
3 checks passed
ownclouders pushed a commit that referenced this pull request Dec 8, 2023
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