File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
build/integration/features Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,8 @@ private function restoreShares(OutputInterface $output) {
263263
264264 foreach ($ this ->shares as $ share ) {
265265 try {
266- if ($ share ->getSharedWith () === $ this ->destinationUser ) {
266+ if ($ share ->getShareType () === \OCP \Share::SHARE_TYPE_USER &&
267+ $ share ->getSharedWith () === $ this ->destinationUser ) {
267268 // Unmount the shares before deleting, so we don't try to get the storage later on.
268269 $ shareMountPoint = $ this ->mountManager ->find ('/ ' . $ this ->destinationUser . '/files ' . $ share ->getTarget ());
269270 if ($ shareMountPoint ) {
Original file line number Diff line number Diff line change @@ -72,6 +72,19 @@ Feature: transfer-ownership
7272 And As an "user2"
7373 Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
7474
75+ Scenario : transfering ownership of file shares to user with the same id as the group
76+ Given user "user0" exists
77+ And user "test" exists
78+ And user "user2" exists
79+ And group "test" exists
80+ And user "user2" belongs to group "test"
81+ And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
82+ And file "/somefile.txt" of user "user0" is shared with group "test"
83+ When transfering ownership from "user0" to "test"
84+ And the command was successful
85+ And As an "user2"
86+ Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
87+
7588 Scenario : transfering ownership does not transfer received shares
7689 Given user "user0" exists
7790 And user "user1" exists
You can’t perform that action at this time.
0 commit comments