Skip to content

Commit 9fa0477

Browse files
Merge pull request #52503 from nextcloud/fix/files_sharing/filter-own-reshared-shares
2 parents d63803d + 7c6602c commit 9fa0477

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

apps/files_sharing/lib/MountProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function getMountsForUser(IUser $user, IStorageFactory $loader) {
5555

5656
// filter out excluded shares and group shares that includes self
5757
$shares = array_filter($shares, function (IShare $share) use ($user) {
58-
return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID();
58+
return $share->getPermissions() > 0 && $share->getShareOwner() !== $user->getUID() && $share->getSharedBy() !== $user->getUID();
5959
});
6060

6161
$superShares = $this->buildSuperShares($shares, $user);

build/integration/files_features/transfer-ownership.feature

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -210,19 +210,10 @@ Feature: transfer-ownership
210210
And user "user1" accepts last share
211211
When transferring ownership from "user0" to "user1"
212212
And the command was successful
213-
And As an "user1"
214-
Then Downloaded content when downloading file "/test/somefile.txt" with range "bytes=0-6" should be "This is"
215213
And using old dav path
216214
And as "user0" the folder "/test" exists
217215
And using received transfer folder of "user1" as dav path
218216
And as "user1" the folder "/test" does not exist
219-
And As an "user1"
220-
And Getting info of last share
221-
And the OCS status code should be "100"
222-
And Share fields of last share match with
223-
| uid_owner | user1 |
224-
| uid_file_owner | user3 |
225-
| share_with | group1 |
226217

227218
Scenario: transferring ownership of folder reshared with group to a user not in the group
228219
Given user "user0" exists

0 commit comments

Comments
 (0)