Make share permission check work correctly from share manager#26684
Closed
PVince81 wants to merge 1 commit into
Closed
Make share permission check work correctly from share manager#26684PVince81 wants to merge 1 commit into
PVince81 wants to merge 1 commit into
Conversation
Instead of checking for valid share permissions for reshares in the OCS controller, do it correctly in the share manager. For this, the share manager needs to read the permissions from the recipient's received node instead of the node that is stored inside the share which isn't guaranteed to be the correct one.
|
@PVince81, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rullzer, @schiessle and @mjobst-necls to be potential reviewers. |
| throw new \InvalidArgumentException('A share requires permissions'); | ||
| } | ||
|
|
||
| // Actual permissions need to be taken from the user who is created the share. |
Contributor
There was a problem hiding this comment.
... 'has' created the share.
Contributor
There was a problem hiding this comment.
This function should be renamed to generalChecks, because it is also called by updateShare().
Contributor
There was a problem hiding this comment.
The rest looks good 👍
Contributor
Author
|
risky with not much value, closing |
Closed
11 tasks
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
As an API consumer, I expect the PHP Share API (share manager) to take care of all sorts of validation without having to do so myself. Currently some validation is done in the OCS API class instead.
This PR moves some of the validation to happen in the share manager instead.
Related Issue
Discovered while looking into #26639
Motivation and Context
See description
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
TODOs
Instead of checking for valid share permissions for reshares in the OCS
controller, do it correctly in the share manager. For this, the share
manager needs to read the permissions from the recipient's received
node instead of the node that is stored inside the share which isn't
guaranteed to be the correct one.