Skip to content

Commit

Permalink
Catch NotPermittedException
Browse files Browse the repository at this point in the history
This error occurr when the user did not accepted the therms of user

Signed-off-by: Vitor Mattos <[email protected]>
  • Loading branch information
vitormattos committed Oct 30, 2023
1 parent 5fe147c commit 858f4de
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Service/MenuSectionsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
use OCP\Files\IAppData;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
use OCP\Files\NotPermittedException;
use OCP\IEmojiHelper;
use OCP\IURLGenerator;
use OCP\IUserSession;
Expand Down Expand Up @@ -94,7 +95,7 @@ public function getList(): array {
$list[$key]['icon'] = $icon->getContent();
}
}
} catch (NotFoundException $e) {
} catch (NotFoundException | NotPermittedException $e) {
}
}
return $list;
Expand Down

0 comments on commit 858f4de

Please sign in to comment.