Skip to content

Enhancement: Ability to Change Share Item Visibility in Graph API - #8750

Merged
fschade merged 4 commits into
owncloud:masterfrom
fschade:graph-item-visibility-api
Apr 22, 2024
Merged

fschade merged 4 commits into
owncloud:masterfrom
fschade:graph-item-visibility-api

Conversation

@fschade

@fschade fschade commented Mar 27, 2024

Copy link
Copy Markdown
Contributor

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

fschade commented Mar 28, 2024 •

Copy link
Copy Markdown
Contributor Author

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

rhafer commented Apr 3, 2024

Copy link
Copy Markdown
Contributor

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

fschade commented Apr 4, 2024

Copy link
Copy Markdown
Contributor Author

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 marked this pull request as ready for review April 16, 2024 09:24
@fschade
fschade requested review from 2403905, kobergj and rhafer April 16, 2024 15:11

@rhafer rhafer left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread services/graph/pkg/service/v0/base.go Resolved
Comment thread services/graph/pkg/service/v0/utils.go Resolved
Comment thread services/graph/pkg/service/v0/utils.go Resolved
Comment thread services/graph/pkg/service/v0/utils.go Resolved
fschade added 4 commits April 22, 2024 15:12
Introduce the `PATCH /graph/v1beta1/drives/{driveID}/items/{itemID}` Graph API endpoint which allows updating individual Drive Items.
@sonarqubecloud

Copy link
Copy Markdown

@fschade
fschade merged commit b8ed049 into owncloud:master Apr 22, 2024
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
@micbar micbar mentioned this pull request Jun 19, 2024
23 of 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.

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

2 participants