Skip to content

Conversation

@danxuliu
Copy link
Member

@danxuliu danxuliu commented Apr 8, 2025

Summary

The provider for mail shares is not available when the sharebymail app is disabled), and in that case a ProviderException is thrown when trying to get it.

Note that this fix only catches the exception and that is it. If the sharebymail app is disabled and the deleted share had a mail reshare that reshare will not be promoted, and therefore it will still be a reshare if the sharebymail app is enabled again (the reshare will not be deleted either because deleting a share only deletes the children returned by its provider, and the default provider used for user and group shares does not return mail shares).

No tests were added to reduce the possible conflicts in the backports and ease including them in the RCs 🙈

How to test

  • Disable the sharebymail app
  • Open the Files app
  • Create a share with another user
  • Delete the share

Result with this pull request

The share is deleted

Result without this pull request

Error deleting the share is shown. However, if the page is reloaded it can be seen that the share was actually deleted (as the error happened when promoting the reshares, and at that point the share was already deleted).

The provider for mail shares is not available when the "sharebymail" app
is disabled, and in that case a "ProviderException" is thrown when
trying to get it.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu added this to the Nextcloud 32 milestone Apr 8, 2025
@danxuliu
Copy link
Member Author

danxuliu commented Apr 8, 2025

/backport to stable31

@danxuliu
Copy link
Member Author

danxuliu commented Apr 8, 2025

/backport to stable30

@danxuliu
Copy link
Member Author

danxuliu commented Apr 8, 2025

/backport to stable29

@danxuliu danxuliu marked this pull request as ready for review April 8, 2025 06:00
@danxuliu danxuliu requested a review from a team as a code owner April 8, 2025 06:00
@danxuliu danxuliu requested review from ArtificialOwl, come-nc and nfebe and removed request for a team April 8, 2025 06:00
@susnux susnux merged commit 90a3928 into master Apr 8, 2025
197 of 200 checks passed
@susnux susnux deleted the handle-missing-share-providers-when-promoting-reshares branch April 8, 2025 13:33
@susnux
Copy link
Contributor

susnux commented Apr 8, 2025

/backport to stable28

@skjnldsv skjnldsv modified the milestones: Nextcloud 33, Nextcloud 32 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: No share provider for share type 4

5 participants