aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-07-23 09:47:24 +0200
committerMorris Jobke <hey@morrisjobke.de>2018-07-24 15:05:42 +0200
commitb7474ed482689686b334b4c628279b7484caf78f (patch)
treeace3565672b358a0f9596c686f2a1223107f0d4d /build
parent5cfac8eceae65634d9718da6a9e0951ed36c8391 (diff)
downloadnextcloud-server-b7474ed482689686b334b4c628279b7484caf78f.tar.gz
nextcloud-server-b7474ed482689686b334b4c628279b7484caf78f.zip
Fix transfering ownership of a share to user with same id as receiver
When the ownership of a user share is transfered to the receiver the share is removed, as the receiver now owns the original file. However, due to a missing condition, any share with a group, link or remote with the same id as the user was removed, not only the user shares. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'build')
-rw-r--r--build/integration/features/transfer-ownership.feature13
1 files changed, 13 insertions, 0 deletions
diff --git a/build/integration/features/transfer-ownership.feature b/build/integration/features/transfer-ownership.feature
index 7990eac3280..3f10fa75a83 100644
--- a/build/integration/features/transfer-ownership.feature
+++ b/build/integration/features/transfer-ownership.feature
@@ -72,6 +72,19 @@ Feature: transfer-ownership
And As an "user2"
Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
+ Scenario: transfering ownership of file shares to user with the same id as the group
+ Given user "user0" exists
+ And user "test" exists
+ And user "user2" exists
+ And group "test" exists
+ And user "user2" belongs to group "test"
+ And User "user0" uploads file "data/textfile.txt" to "/somefile.txt"
+ And file "/somefile.txt" of user "user0" is shared with group "test"
+ When transfering ownership from "user0" to "test"
+ And the command was successful
+ And As an "user2"
+ Then Downloaded content when downloading file "/somefile.txt" with range "bytes=0-6" should be "This is"
+
Scenario: transfering ownership does not transfer received shares
Given user "user0" exists
And user "user1" exists