Skip to content

Conversation

@LukasReschke
Copy link
Member

@LukasReschke LukasReschke added 3. to review Waiting for reviews downstream labels Dec 23, 2016
@LukasReschke LukasReschke added this to the Nextcloud 12.0 milestone Dec 23, 2016
@mention-bot
Copy link

@LukasReschke, thanks for your PR! By analyzing the history of the files in this pull request, we identified @rullzer, @schiessle, @nickvergessen and @Xenopathic to be potential reviewers.

@LukasReschke
Copy link
Member Author

Tests are failing. 🚀

@LukasReschke LukasReschke added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Dec 23, 2016
*
* @return bool true if allowed, false otherwise
*
* @since 11.0
Copy link
Member

Choose a reason for hiding this comment

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

since 12.0 in our case

@rullzer rullzer force-pushed the downstream-share20-istargetallowed branch from 5d5dc64 to 1df37ac Compare January 11, 2017 07:54
@rullzer
Copy link
Member

rullzer commented Jan 11, 2017

@icewind1991 I'd like to get your opinion on this as well

Copy link
Member

@icewind1991 icewind1991 left a comment

Choose a reason for hiding this comment

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

I'm not happy with the way this checks if the target is shared (do we really not have an existing method to do that?), getting the node and iterating over parents is needlessly expensive

$shareManager = \OC::$server->getShareManager();
$targetNode = $targetNodes[0];
// FIXME: make it stop earlier in '/$userId/files'
while (!is_null($targetNode) && $targetNode->getPath() !== '/') {
Copy link
Member

Choose a reason for hiding this comment

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

Why does byPath want a Node instead of a path 🙈

Copy link
Member

Choose a reason for hiding this comment

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

We use nodes everywhere. Was just naming stuff to be somewhat siilar to the old one (you should have complained when the code was reviewed 😉 )

@rullzer
Copy link
Member

rullzer commented Jan 12, 2017

@icewind1991 well give me my closure table and I can optimize it properly....

@rullzer rullzer force-pushed the downstream-share20-istargetallowed branch from 1df37ac to 5c81884 Compare April 3, 2017 12:06
@rullzer
Copy link
Member

rullzer commented Apr 3, 2017

@icewind1991 could you have a look at the failing tests so we can get this in? I know you have some objections but lets fix them separatly.

@LukasReschke
Copy link
Member Author

@icewind1991 🏓

@MorrisJobke
Copy link
Member

Let me rebase this and get #3944 into this.

Vincent Petry and others added 4 commits May 1, 2017 13:13
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
$fileId = (int)$targetStorage->getCache()->getId(dirname($targetInternalPath));
}

$targetNodes = \OC::$server->getRootFolder()->getById($fileId);
Copy link
Member

Choose a reason for hiding this comment

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

The first unit test fails here.

1) OCA\Files_Sharing\Tests\UpdaterTest::testDeleteParentFolder
Failed asserting that true is false.
/drone/src/github.com/nextcloud/server/apps/files_sharing/tests/UpdaterTest.php:105

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@MorrisJobke MorrisJobke force-pushed the downstream-share20-istargetallowed branch from 5c81884 to a6f4096 Compare May 1, 2017 16:25
@MorrisJobke
Copy link
Member

@icewind1991 Please have a look at the failing tests. Would be nice to get this in and I don't properly understand this :/

@MorrisJobke
Copy link
Member

Nothing for 12 anymore

@MorrisJobke MorrisJobke closed this Aug 9, 2017
@MorrisJobke MorrisJobke deleted the downstream-share20-istargetallowed branch August 9, 2017 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants