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

enhancement(sharing): Return space permissions when looking up space root #8642

Merged
merged 5 commits into from
Mar 18, 2024

Conversation

rhafer
Copy link
Contributor

@rhafer rhafer commented Mar 13, 2024

Make GET https://localhost:9200/graph/v1beta1/drives/{{driveid}}/items/{{itemid}}/permissions work for spaceroots

This is still missing link permission on the space root.

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

update-docs bot commented Mar 13, 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.

This role was renamed to "Manager" a while ago.
…1 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.
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: owncloud#8352
@rhafer
Copy link
Contributor Author

rhafer commented Mar 14, 2024

@JammingBen You might wanna try this. Should fix #8352. We're still lacking support for updating/deleting space permissions via PATCH/DELETE https://localhost:9200/graph/v1beta1/drives/{{driveid}}/items/{{itemid}}/permissions/{{permissionid}}

Will work on that next.

Copy link

sonarcloud bot commented Mar 14, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
9 New Bugs (required ≤ 0)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@rhafer rhafer marked this pull request as ready for review March 14, 2024 17:32
@rhafer
Copy link
Contributor Author

rhafer commented Mar 14, 2024

image

Hm, the linter/sonar cloud is running crazy again. It complain about code that isn't touched in this PR and also the complaint doesn't make much sense, why should we use Getters for a bool in struct 🤷‍♂️ ?

Copy link
Contributor

@JammingBen JammingBen left a comment

Choose a reason for hiding this comment

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

Tested in Web, works well as far as I can see!

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.

Just a question. Rest looks good 👍

services/graph/pkg/service/v0/driveitems.go Show resolved Hide resolved
@rhafer rhafer merged commit dcdbfd8 into owncloud:master Mar 18, 2024
3 of 4 checks passed
@rhafer rhafer deleted the issue/8352 branch March 18, 2024 10:54
@micbar micbar mentioned this pull request Jun 19, 2024
24 tasks
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.

None yet

3 participants