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

Revert "[stable10] Fix failure of shares which are already moved with transfer-ownership #31164

Closed
wants to merge 1 commit into from

Conversation

PVince81
Copy link
Contributor

Reverts #30161

Had to adjust the test reverting as the test file moved to a new location since the original PR

@PVince81 PVince81 added 3 - To Review p2-high Escalation, on top of current planning, release blocker labels Apr 17, 2018
@PVince81 PVince81 added this to the QA milestone Apr 17, 2018
@PVince81 PVince81 self-assigned this Apr 17, 2018
@PVince81 PVince81 requested a review from sharidas April 17, 2018 10:21
@PVince81
Copy link
Contributor Author

Fixes #31150

@sharidas
Copy link
Contributor

Below are the steps done to verify the change.
The command fails, as expected:

➜  owncloud3 git:(stable10-revert-transfer-ownership-share) ✗ ./occ files:transfer-ownership admin user1                                                       
Cannot load Xdebug - it was already loaded
Analysing files of admin ...
    1 [============================]
Collecting all share information for files and folder of admin ...
    2 [============================]
Transferring files to user1/files/transferred from admin on 20180417_102837 ...
Restoring shares ...
 1/2 [==============>-------------]  50%Could not restore share with id 2:#0 /home/sujith/test/owncloud3/lib/private/Share20/Manager.php(1108): OC\Share20\DefaultShareProvider->getShareById('2', NULL)
#1 /home/sujith/test/owncloud3/lib/private/Share20/Manager.php(691): OC\Share20\Manager->getShareById('2')
#2 /home/sujith/test/owncloud3/apps/files/lib/Command/TransferOwnership.php(317): OC\Share20\Manager->updateShare(Object(OC\Share20\Share))
#3 /home/sujith/test/owncloud3/apps/files/lib/Command/TransferOwnership.php(171): OCA\Files\Command\TransferOwnership->restoreShares(Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /home/sujith/test/owncloud3/lib/composer/symfony/console/Command/Command.php(252): OCA\Files\Command\TransferOwnership->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /home/sujith/test/owncloud3/lib/composer/symfony/console/Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /home/sujith/test/owncloud3/lib/composer/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\TransferOwnership), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /home/sujith/test/owncloud3/lib/composer/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /home/sujith/test/owncloud3/lib/private/Console/Application.php(161): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /home/sujith/test/owncloud3/console.php(106): OC\Console\Application->run()
#10 /home/sujith/test/owncloud3/occ(11): require_once('/home/sujith/te...')
#11 {main}
 2/2 [============================] 100%
➜  owncloud3 git:(stable10-revert-transfer-ownership-share) ✗ git show
➜  owncloud3 git:(stable10-revert-transfer-ownership-share) ✗

The folder foo/test is created as admin user. 'foo/test' is shared to user user1. And as user1 create public link. After this command is run,

  • the folder foo/test is available under transferred folder
  • the public share link doesn't work. User has to create a new link.

Tried with private link in user1. And after running the command, when user tries to open the link,
it opens the folder from transferred folder.

Copy link
Contributor

@sharidas sharidas left a comment

Choose a reason for hiding this comment

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

After the change is reverted, the command does throw exception. And the private link can be opened. 👍

@codecov
Copy link

codecov bot commented Apr 17, 2018

Codecov Report

Merging #31164 into stable10 will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##             stable10   #31164      +/-   ##
==============================================
+ Coverage       60.15%   60.15%   +<.01%     
+ Complexity      18182    18180       -2     
==============================================
  Files            1194     1194              
  Lines           71738    71734       -4     
  Branches         1248     1248              
==============================================
  Hits            43154    43154              
+ Misses          28214    28210       -4     
  Partials          370      370
Flag Coverage Δ Complexity Δ
#javascript 52.67% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 60.97% <ø> (ø) 18180 <ø> (-2) ⬇️
Impacted Files Coverage Δ Complexity Δ
apps/files/lib/Command/TransferOwnership.php 0% <ø> (ø) 47 <0> (-2) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5617ec8...82f664f. Read the comment docs.

@PVince81
Copy link
Contributor Author

PVince81 commented Apr 17, 2018

@sharidas on the chat @pako81 claimed that the share is still lost despite the error. Please double check.

@pako81 can you post your test steps ?

@PVince81
Copy link
Contributor Author

I've tested this and the share is still lost, so not a solution

@PVince81 PVince81 closed this Apr 17, 2018
@PVince81 PVince81 deleted the stable10-revert-transfer-ownership-share branch April 17, 2018 12:00
@lock
Copy link

lock bot commented Jul 31, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3 - To Review p2-high Escalation, on top of current planning, release blocker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants