[WIP] let share manager handles permission increases in sharing#35399
Closed
karakayasemi wants to merge 1 commit into
Closed
[WIP] let share manager handles permission increases in sharing#35399karakayasemi wants to merge 1 commit into
karakayasemi wants to merge 1 commit into
Conversation
Contributor
Author
|
It is breaking many other things, need to find solution with more small change. |
Contributor
|
@patrickjahns @DeepDiver1975 Could you take a look? |
Contributor
Author
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.
Description
This PR resolves sharing permission increase issues described in below tickets.
Previously, we were determining max permission by using
$share->getNode()->getPermission(). However, actual permissions need to be taken from the user who has created the share. The node inside the share is not guaranteed to be from the perspective of the sharer. This PR determines and calculate permissions by looking sharer's nodes.I followed same logic with this PR: #26684 . I enhanced it and completed its to-do's.
Share20OcsController.phphas too much logic and validations inside of its methods. In a clean approach, Share manager should take care of all sorts of validations and logics instead of controller. I moved some of the validations to manager class.Related Issue
Motivation and Context
See description
How Has This Been Tested?
Tested with step that described in issue tickets. Also, API acceptance tests are added.
Types of changes
Checklist:
Open tasks: