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: Ability to Change Share Item Visibility in Graph API #8750

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

fschade
Copy link
Contributor

@fschade fschade commented Mar 27, 2024

Description

This PR introduces an enhancement and introduces the PUT /graph/v1beta1/drives/{driveID}/items/{itemID} Graph API endpoint, which now allows updating individual Drive Items.

At the moment, the primary changeable property is the share visibility. This enhancement is required for the UI, allowing specific shares to be hidden or unhidden as needed, thereby improving the user experience.

While currently, only the share visibility is considered changeable, this update lays the groundwork for adding more properties to this endpoint in the future.

Related Issue

Motivation and Context

This change provides more control over the visibility of shared items, improving the user experience and offering a new level of flexibility and control to the users.

How Has This Been Tested?

  • unit tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

ToDos:

@fschade fschade self-assigned this Mar 27, 2024
@fschade
Copy link
Contributor Author

fschade commented Mar 28, 2024

i wasn't able to finalize the PR, i can continue working on it after my vacation which would be the week after the next.
Most is implemented already, if someone could continue on in in the meantime im fine, thanks.

@rhafer
Copy link
Contributor

rhafer commented Apr 3, 2024

This PR introduces an enhancement and introduces the PUT /graph/v1beta1/drives/{driveID}/items/{itemID}

Why a PUT? I think we want PATCH here. And AFAIU your PR does implement PATCH semantics?

@fschade
Copy link
Contributor Author

fschade commented Apr 4, 2024

This PR introduces an enhancement and introduces the PUT /graph/v1beta1/drives/{driveID}/items/{itemID}

Why a PUT? I think we want PATCH here. And AFAIU your PR does implement PATCH semantics?

you’re right, I missed that 🤗

@fschade fschade force-pushed the graph-item-visibility-api branch 6 times, most recently from 9a14131 to b91e575 Compare April 16, 2024 09:14
@fschade fschade marked this pull request as ready for review April 16, 2024 09:24
Copy link
Contributor

@rhafer rhafer left a comment

Choose a reason for hiding this comment

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

I think the hide/unhide thing needs to update all received shares for the same resource. (Similar to how mount/unmount update the synchronize flag on all shares)

Also raised some questions, where I'd like to understand some of the reasons for the changes.

In general I think it would be easier to review this PR if the changes that just refactor stuff were done in separate commits. It's ok. After all this is not too big. But you might want to consider it for the future.

services/graph/pkg/service/v0/api_drives_drive_item.go Outdated Show resolved Hide resolved
services/graph/pkg/service/v0/api_drives_drive_item.go Outdated Show resolved Hide resolved
services/graph/pkg/service/v0/base.go Show resolved Hide resolved
services/graph/pkg/service/v0/utils.go Outdated Show resolved Hide resolved
services/graph/pkg/service/v0/utils.go Outdated Show resolved Hide resolved
services/graph/pkg/service/v0/utils.go Outdated Show resolved Hide resolved
Introduce the `PATCH /graph/v1beta1/drives/{driveID}/items/{itemID}` Graph API endpoint which allows updating individual Drive Items.
Copy link

sonarcloud bot commented Apr 22, 2024

@fschade fschade merged commit b8ed049 into owncloud:master Apr 22, 2024
4 checks passed
ownclouders pushed a commit that referenced this pull request Apr 22, 2024
)

* Enhancement: Ability to Change Share Item Visibility in Graph API

Introduce the `PATCH /graph/v1beta1/drives/{driveID}/items/{itemID}` Graph API endpoint which allows updating individual Drive Items.

* fix: failing tests

* fix: consider siblings when updating shares

* fix: reduce sharing service provider interface
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.

[Sharing NG] Make @UI.hidden property editable through API
2 participants