diff options
author | provokateurin <kate@provokateurin.de> | 2025-04-28 14:41:21 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2025-05-19 10:50:55 +0200 |
commit | 503d5f8d6b4ca0e019d4f96e5f09db600de1d8b0 (patch) | |
tree | e484cfb5df4bbb16b1d3e9505ddb5eefde90e9ab | |
parent | 119727d74a802981d0f43ec178302586e50718dd (diff) | |
download | nextcloud-server-backport/52503/stable30.tar.gz nextcloud-server-backport/52503/stable30.zip |
fix(files_sharing): Filter own shares that are resharesbackport/52503/stable30
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r-- | apps/files_sharing/lib/MountProvider.php | 2 | ||||
-rw-r--r-- | build/integration/files_features/transfer-ownership.feature | 9 |
2 files changed, 1 insertions, 10 deletions
diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php index 50565f3eba0..2014c18db1f 100644 --- a/apps/files_sharing/lib/MountProvider.php +++ b/apps/files_sharing/lib/MountProvider.php @@ -53,7 +53,7 @@ class MountProvider implements IMountProvider { // filter out excluded shares and group shares that includes self $shares = array_filter($shares, function (\OCP\Share\IShare $share) use ($user) { - return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID(); + return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID() && $share->getSharedBy() !== $user->getUID(); }); $superShares = $this->buildSuperShares($shares, $user); diff --git a/build/integration/files_features/transfer-ownership.feature b/build/integration/files_features/transfer-ownership.feature index 4e5407cadbb..b7da75421f0 100644 --- a/build/integration/files_features/transfer-ownership.feature +++ b/build/integration/files_features/transfer-ownership.feature @@ -210,19 +210,10 @@ Feature: transfer-ownership And user "user1" accepts last share When transferring ownership from "user0" to "user1" And the command was successful - And As an "user1" - Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is" And using old dav path And as "user0" the folder "/test" exists And using received transfer folder of "user1" as dav path And as "user1" the folder "/test" does not exist - And As an "user1" - And Getting info of last share - And the OCS status code should be "100" - And Share fields of last share match with - | uid_owner | user1 | - | uid_file_owner | user3 | - | share_with | group1 | Scenario: transferring ownership of folder reshared with group to a user not in the group Given user "user0" exists |