fix(sharing): Don't give a reason when share from disabled user is no longer working

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2026-04-13 08:50:31 +02:00 committed by backportbot[bot]
parent 15be6920ee
commit f71bfe554e
2 changed files with 2 additions and 2 deletions

View file

@ -1486,7 +1486,7 @@ class Manager implements IManager {
foreach ($uids as $uid) {
$user = $this->userManager->get($uid);
if ($user?->isEnabled() === false) {
throw new ShareNotFound($this->l->t('The requested share comes from a disabled user'));
throw new ShareNotFound($this->l->t('The requested share does not exist anymore'));
}
}
}

View file

@ -3304,7 +3304,7 @@ class ManagerTest extends \Test\TestCase {
public function testGetShareByTokenHideDisabledUser(): void {
$this->expectException(ShareNotFound::class);
$this->expectExceptionMessage('The requested share comes from a disabled user');
$this->expectExceptionMessage('The requested share does not exist anymore');
$this->config
->expects($this->exactly(2))