Skip to content
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

Fix renaming of non-renamble mounts #5596

Merged
merged 2 commits into from
Jul 21, 2017
Merged

Fix renaming of non-renamble mounts #5596

merged 2 commits into from
Jul 21, 2017

Conversation

icewind1991
Copy link
Member

  • Properly block attempts to rename non movable mountpoint roots
  • Fix the parsing of dav permissions so non-movable mounts dont show as movable in the web ui

Fixes nextcloud/groupfolders#33

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Jul 3, 2017
@icewind1991 icewind1991 added this to the Nextcloud 13 milestone Jul 3, 2017
$manager->moveMount($sourceMountPoint, $mount1->getMountPoint());
if ($internalPath1 === '') {
if ($mount1 instanceof MoveableMount) {
if ($this->isTargetAllowed($absolutePath2)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge with the mount1 instanceof MoveableMount if above?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would require a seperate ($internalPath1 === '' && !$mount1 instanceof MoveableMount) case, imo this one is clearer than splitting it up

@codecov
Copy link

codecov bot commented Jul 17, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@1956ea0). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master    #5596   +/-   ##
=========================================
  Coverage          ?   53.98%           
  Complexity        ?    22466           
=========================================
  Files             ?     1390           
  Lines             ?    85980           
  Branches          ?     1328           
=========================================
  Hits              ?    46418           
  Misses            ?    39562           
  Partials          ?        0
Impacted Files Coverage Δ Complexity Δ
core/js/files/client.js 87.33% <ø> (ø) 0 <0> (?)
lib/private/Files/View.php 85.89% <100%> (ø) 363 <0> (?)

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@MorrisJobke MorrisJobke merged commit 655c262 into master Jul 21, 2017
@MorrisJobke MorrisJobke deleted the mount-rename branch July 21, 2017 21:11
@alexhass
Copy link

May this go into a bugfix release of 12.x or do we need to wait until 13.x?

@MorrisJobke
Copy link
Member

May this go into a bugfix release of 12.x or do we need to wait until 13.x?

It is already backported to stable12 and will land in 12.0.1: #5757

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants