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

Delete file shares through attachments API #3298

Merged
merged 1 commit into from
Sep 7, 2021

Conversation

juliusknorr
Copy link
Member

Previously the file was deleted in the file structure of the user is not
expected as the file might not only be related to the card.

Fixes #2877

Previously the file was deleted in the file structure of the user is not
expected as the file might not only be related to the card.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

I don't know exactly all that what is changed by this PR.

Did some tests though:

  • Before: Removing an attachment (local or directly uploaded) deletes the file
  • With this PR, removing an attachment does not delete the file
  • Another scenario with this PR:
    • User A share a file F with user B (user share via Files)
    • User A shares a board with user B
    • User A adds file F as attachment to a card, file is shared with the card
    • User B leaves the user share related with file F
    • User B sees file F as attachment of the card but as a "pending share"

So it seems fine to me. Is there any other use case to check?

@juliusknorr
Copy link
Member Author

No the first case was what this PR was supposed to cover. Before still had the approach from the old attachments where the file would be deleted which doesn't fit the model with sharing a file from the files app anymore.

@juliusknorr juliusknorr merged commit 6caa7bc into master Sep 7, 2021
@juliusknorr juliusknorr deleted the bugfix/attachment-delete branch September 7, 2021 11:10
@juliusknorr
Copy link
Member Author

/backport to stable22

@juliusknorr
Copy link
Member Author

/backport to stable1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using a card to stop sharing an attachment deletes the entire file.
2 participants