Repository navigation
Conversation
Fixes nextcloud#60144 Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
ab40088 to
cce464b
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
Add token persistence to the existing parameterized update query in apps/sharebymail/lib/ShareByMailProvider.php, using the supplied share's getToken() alongside the other persisted fields. Apply this consistently to email-backed shares: the existing API already accepts custom tokens for both TYPE_LINK and TYPE_EMAIL, and the thread's suggestion that email token immutability is intentional is a participant's hypothesis rather than a documented restriction in the inspected code. Extend the existing database-backed ShareByMailProviderTest::testUpdate coverage, explicitly providing the original or replacement token on share fixtures and checking the stored value; add a file-request-shaped case with a folder, CREATE permission, empty recipient, and file-request attributes.
Customizing a File Request token returns apparent success and changes the displayed link, but the persisted share retains its previous token. The reporter reproduced this on Nextcloud 33, and another participant confirmed it on version 34 and a beta. File requests created with mail sharing enabled use TYPE_EMAIL even without a recipient, so their updates reach ShareByMailProvider rather than the link-share provider. The API sets the requested token on the share object, but ShareByMailProvider::update() returns that object without writing its token to the database.
TODO
Checklist
Not verified: this needs a person on the named hardware or environment.
3. to review, feature component)Not run: no test command resolved in this workspace, so nothing was executed to pass.
stable32)Not run: no test command resolved in this workspace, so nothing was executed to pass.
AI (if applicable)
AI was used for assistance.