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

[stable18] Fix share transfer of single files and on the transfered node #22802

Merged
merged 8 commits into from
Oct 1, 2020

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Sep 11, 2020

Combined backport of #22116 #22648 including the new integration tests from #22761 and #22948

@juliushaertl
Copy link
Member Author

Oh, thanks for taking care already @danxuliu ❤️

Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

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

Oh, thanks for taking care already @danxuliu ❤️

My pleasure :-)

Regarding the sqlite failure it is not related to this pull request. Bisecting it in my system shows that it began in #21982. However, in Drone sometimes passes and sometimes fails, so take that bisection with a pinch of salt ;-) Also it does not seem to be triggered when running only apps/files_sharing/tests/SharedMountTest.php, it seems to require running the full suite. So I do not know what is going on 🤷 But whatever it is, it is not related to this pull request :-P

lib/public/Files/Config/IUserMountCache.php Show resolved Hide resolved
juliushaertl and others added 5 commits September 17, 2020 19:01
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
The integration tests did not verify that the files were actually
transferred between the users, only that the files were downloadable.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The integration tests did not verify that the shares were actually
transferred between the users (or that they were removed due to being
transferred to the sharee).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Currently only transferring ownership of a reshare with a group to a
user in the group is possible.

When transferring ownership of a reshare with another user or with a
group to a user not in the group restoring the share fails (but the
command succeeds, it only fails for the specific files that are
reshares).

When transferring ownership of a path that is a reshare the command
fails (as when a specific path is provided the path tries to move the
file, it does not take into account reshares).

The added integration tests reflect the above behaviours.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@juliushaertl juliushaertl force-pushed the backport/stable18/22116-22648-22761 branch from c223495 to b6b83d6 Compare September 17, 2020 17:02
@juliushaertl juliushaertl added 3. to review Waiting for reviews bug and removed 2. developing Work in progress labels Sep 17, 2020
@faily-bot
Copy link

faily-bot bot commented Sep 17, 2020

🤖 beep boop beep 🤖

Here are the logs for the failed build:

Status of 33179: failure

mysql8.0-php7.2

Show full log
There were 2 warnings:

1) Test\Files\ViewTest::testRenameFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

2) Test\Files\ViewTest::testCopyFailDeleteTargetKeepSource
Trying to configure method "writeStream" which cannot be configured because it does not exist, has not been specified, is final, or is static

--

There was 1 failure:

1) OCA\Files_Sharing\Tests\SharedMountTest::testPermissionMovedGroupShare with data set #82 ('folder', 17, 15)
Failed asserting that false is true.

/drone/src/apps/files_sharing/tests/SharedMountTest.php:361

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.

Code looks good 👍

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The files:transfer-ownership performs a sanitization of users with
"risky" display names (including characters like "\" or "/").

In order to allow (escaped) double quotes in the display name the
regular expression used in the "user XXX with displayname YYY exists"
step is not the "standard" one, "([^"]*)".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Until recently (it was fixed in ac2999a) when a path was transferred
other shares with the target user were removed, so a test was added to
ensure that it does not happen again.

Besides that a test to ensure that other files with the target user are
not transferred was added too (it did not fail before, but seemed
convenient to have that covered too :-) ).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@rullzer rullzer merged commit 7b35104 into stable18 Oct 1, 2020
@rullzer rullzer deleted the backport/stable18/22116-22648-22761 branch October 1, 2020 06:44
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 bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants