-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Fix expiration date changing for file shared by link #14035
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
Conversation
Pass shareId to setExpirationDate()
Signed-off-by: Morris Jobke <[email protected]>
MorrisJobke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works. 👍 I also checked in the compiled assets because that is what we are doing here. It's not obvious to new contributors, so don't worry. We are currently about to improve our on boarding here 😃
|
We also use "signed-off-by" messages inside the commit body to indicate that the developer certificate of origin is respected. You can read more about this in https://github.com/nextcloud/server/blob/master/.github/CONTRIBUTING.md#sign-your-work and what this means and how to apply it. Don't be scare it sounds more than it actually is. And welcome aboard 🚀 |
|
/backport to stable15 |
|
@MorrisJobke thanks for the clarification |
danxuliu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
Nice explanation, thanks :-)
|
@MorrisJobke Wait for the "Signed-off-by"? Squash both commits? Merge as is? |
|
Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22 |
|
The backport to stable15 failed. Please do this backport manually. |
|
Backport is in #14212 |
Problem
Disabling expiration date for the link share leads to creation of a new link share.
Reason
Since 1bd6d39
setExpirationDate()accepts not onlyexpireDate, but alsoshareId:server/core/js/sharedialoglinkshareview.js
Line 625 in 1bd6d39
It was applied at
server/core/js/sharedialoglinkshareview.js
Line 616 in 1bd6d39
server/core/js/sharedialoglinkshareview.js
Line 596 in 1bd6d39
So it ends up with creating a new link share, and not editing the existing one instead.
server/core/js/shareitemmodel.js
Line 149 in 1bd6d39
Solution
Pass correct
shareIdtosetExpirationDate()