Merge pull request #26380 from nextcloud/backport/26372/stable19
[stable19] gracefully handle deleteFromSelf when share is already gone
This commit is contained in:
commit
dcfd2afb75
|
@ -470,7 +470,8 @@ class DefaultShareProvider implements IShareProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$group->inGroup($user)) {
|
if (!$group->inGroup($user)) {
|
||||||
throw new ProviderException('Recipient not in receiving group');
|
// nothing left to do
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to fetch user specific share
|
// Try to fetch user specific share
|
||||||
|
|
|
@ -1575,9 +1575,6 @@ class DefaultShareProviderTest extends \Test\TestCase {
|
||||||
|
|
||||||
|
|
||||||
public function testDeleteFromSelfGroupUserNotInGroup() {
|
public function testDeleteFromSelfGroupUserNotInGroup() {
|
||||||
$this->expectException(\OC\Share20\Exception\ProviderException::class);
|
|
||||||
$this->expectExceptionMessage('Recipient not in receiving group');
|
|
||||||
|
|
||||||
$qb = $this->dbConn->getQueryBuilder();
|
$qb = $this->dbConn->getQueryBuilder();
|
||||||
$stmt = $qb->insert('share')
|
$stmt = $qb->insert('share')
|
||||||
->values([
|
->values([
|
||||||
|
|
Loading…
Reference in New Issue