Workaround/quick-fix for broken resharing issue #14082#14084
Closed
mikaelh wants to merge 1 commit intonextcloud:stable15from
mikaelh:stable15
Closed
Workaround/quick-fix for broken resharing issue #14082#14084mikaelh wants to merge 1 commit intonextcloud:stable15from mikaelh:stable15
mikaelh wants to merge 1 commit intonextcloud:stable15from
mikaelh:stable15
Conversation
Signed-off-by: Mikael Hammarin <mhammarin@ecit.com>
Member
|
Should be fixed with #14083 |
Member
|
Closing as per above, thanks for your work anyway! |
Contributor
Author
|
Hi @nickvergessen However, IMHO the fix in #14083 just mask the actual issue in publishActivity() It works when creating a share because createShare() seem to be broken and pass the initiator Path while deleteShare() passes the owner Path to publishActivity() |
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 free
to 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.
This is a workaround for broken resharing issue in issue #14082
Partly introduced in PR #12626
Problem 1 causes an exception to be thrown because of incorrect arguments
Problem 2 is a bit more tricky
The issue is that the share object is initialized differently when passed to createShareActivity().
Via ShareAPIController:deleteShare() and $this->getShareById($id) the Node in the share object is initiated on the owner of the share.
Via ShareAPIController:createShare() the Node in the share object is instantiated based on the logged in user (or share initiator).
This means that createShareActivity() is called with the same IShare object but the node is pointing either to owner or initiator depending on if it is a create or delete.
This fix is a quick workaround to cope with this issue, even though the root cause need to be investigated.