Uh oh!
There was an error while loading. Please reload this page.
Update user share must use correct expiration validation - #26200
Merged
PVince81 merged 1 commit intoMar 19, 2021
Conversation
Updating a user or group share now uses the correct method for the validation of the expiration date. Instead of using the one from links it uses the one for internal shares. To avoid future confusion, the method "validateExpirationDate" has been renamed to "validateExpirationDateLink". Signed-off-by: Vincent Petry <vincent@nextcloud.com>
PVince81
requested review from
ChristophWurst, MorrisJobke, kesselb, nickvergessen and rullzerMarch 18, 2021 16:14
PVince81
commented
Mar 18, 2021
| if ($share->getExpirationDate() != $originalShare->getExpirationDate()) { | ||
| //Verify the expiration date | ||
| $this->validateExpirationDate($share); | ||
| $this->validateExpirationDateInternal($share); |
PVince81
commented
Mar 18, 2021
| if ($share->getExpirationDate() != $originalShare->getExpirationDate()) { | ||
| //Verify the expiration date | ||
| $this->validateExpirationDate($share); | ||
| $this->validateExpirationDateInternal($share); |
This was referenced Mar 18, 2021
PVince81
commented
Mar 18, 2021
MemberAuthor
/backport to stable21 |
PVince81
commented
Mar 18, 2021
MemberAuthor
/backport to stable20 |
PVince81
commented
Mar 18, 2021
MemberAuthor
/backport to stable19 |
MorrisJobke
approved these changes
Mar 18, 2021
ChristophWurst
approved these changes
Mar 19, 2021
| * @throws \Exception | ||
| */ | ||
| protected function validateExpirationDate(IShare $share) { | ||
| protected function validateExpirationDateLink(IShare $share) { |
There was a problem hiding this comment.
Suggested change
| protectedfunctionvalidateExpirationDateLink(IShare$share) { | |
| protectedfunctionvalidateLinkExpirationDate(IShare$share) { |
if that makes it a tad clearer. just an idea :)
MemberAuthor
There was a problem hiding this comment.
the other one is called validateLinkExpirationDateInternal so I'd have to rename it also everywhere...
nah... another time, but thanks for the suggestion
This was referenced Mar 19, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updating a user or group share now uses the correct method for the
validation of the expiration date. Instead of using the one from links
it uses the one for internal shares.
To avoid future confusion, the method "validateExpirationDate" has been
renamed to "validateExpirationDateLink".
Fixes#26197