-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[stable8.2] Fix post_unshareFromSelf hook parameter format #26364
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
|
@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @schiessle, @icewind1991 and @nickvergessen to be potential reviewers. |
|
@SergioBertolinSG mind checking whether we have integration tests for etag propagation (I'm sure we do) and whether they cover these scenarios ? Since we backported most tests it seems that this situation wasn't caught. |
|
When unsharing from self in a group share situation, the share items passed to the post_unshareFromSelf hook were using the wrong format in which the attribute names (ex: "share_type") have non camel-case format. This fix makes sure that in group sharing case we use the correct format. It looks like the code was already producing it but in array_merge it was not using it and adding the unprocessed one.
0231100 to
e7cb4ac
Compare
|
Adjusted unit tests, now it looks better. |
| $shareTmp['fileTarget'] = $groupShare['file_target']; | ||
| } | ||
| $listOfUnsharedItems = array_merge($listOfUnsharedItems, array($groupShare)); | ||
| $listOfUnsharedItems = array_merge($listOfUnsharedItems, array($shareTmp)); |
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.
Taking into account we don't really care about the keys in the resulting array, I think $listOfUnsharedItems[] = $shareTmp should be better.
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.
I only adjusted it to match what we had in the other block above for the user share. Didn't want to make more changes.
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.
Ok, fair enough.
|
👍 |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
When unsharing from self in a group share situation, the share items passed to the post_unshareFromSelf hook were using the wrong format in which the attribute names (ex: "share_type") have non camel-case format.
This fix makes sure that in group sharing case we use the correct format. It looks like the code was already producing it but in array_merge it was not using it and adding the unprocessed one
Related Issue
Fixes #26346 for OC 8.2 (specifically)
Motivation and Context
Fixes etag propagation that is triggered by said hook that this fixes, see #26346 (comment)
How Has This Been Tested?
Manual testing with group shares and user shares:
Screenshots (if appropriate):
Types of changes
Checklist:
@DeepDiver1975 @jvillafanez @butonic