Skip to content

[WIP] let share manager handles permission increases in sharing#35399

Closed
karakayasemi wants to merge 1 commit into
masterfrom
fix-permission-increase
Closed

[WIP] let share manager handles permission increases in sharing#35399
karakayasemi wants to merge 1 commit into
masterfrom
fix-permission-increase

Conversation

@karakayasemi

Copy link
Copy Markdown
Contributor

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.php has 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@karakayasemi karakayasemi added this to the development milestone Jun 1, 2019
@karakayasemi
karakayasemi requested review from VicDeo and phil-davis June 1, 2019 20:09
@karakayasemi karakayasemi self-assigned this Jun 1, 2019
@karakayasemi
karakayasemi requested a review from pako81 June 1, 2019 20:11
@karakayasemi karakayasemi changed the title let share manager handles permission increases in sharing [WIP] let share manager handles permission increases in sharing Jun 1, 2019
@karakayasemi

Copy link
Copy Markdown
Contributor Author

It is breaking many other things, need to find solution with more small change.

@micbar micbar added the p2-high Escalation, on top of current planning, release blocker label Jun 3, 2019
@micbar

micbar commented Jun 7, 2019

Copy link
Copy Markdown
Contributor

@patrickjahns @DeepDiver1975 Could you take a look?

@karakayasemi

Copy link
Copy Markdown
Contributor Author

#35447 @micbar there is another PR to solve same issue. Just added its link here as an information.

@karakayasemi
karakayasemi deleted the fix-permission-increase branch July 19, 2019 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 - Developing p2-high Escalation, on top of current planning, release blocker Type:Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants