Merge pull request #26382 from nextcloud/backport/26372/stable21

[stable21] gracefully handle deleteFromSelf when share is already gone
This commit is contained in:
Christoph Wurst 2021-03-31 07:43:01 +02:00 committed by GitHub
commit 3e5fbd4ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -470,7 +470,8 @@ class DefaultShareProvider implements IShareProvider {
}
if (!$group->inGroup($user)) {
throw new ProviderException('Recipient not in receiving group');
// nothing left to do
return;
}
// Try to fetch user specific share

View File

@ -1558,9 +1558,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
public function testDeleteFromSelfGroupUserNotInGroup() {
$this->expectException(\OC\Share20\Exception\ProviderException::class);
$this->expectExceptionMessage('Recipient not in receiving group');
$qb = $this->dbConn->getQueryBuilder();
$stmt = $qb->insert('share')
->values([