From 858f4de2284225506745af99dc20454ed58848f7 Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 29 Oct 2023 23:05:33 -0300 Subject: [PATCH] Catch NotPermittedException This error occurr when the user did not accepted the therms of user Signed-off-by: Vitor Mattos --- lib/Service/MenuSectionsService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Service/MenuSectionsService.php b/lib/Service/MenuSectionsService.php index e3219ba..e08ce39 100644 --- a/lib/Service/MenuSectionsService.php +++ b/lib/Service/MenuSectionsService.php @@ -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; @@ -94,7 +95,7 @@ public function getList(): array { $list[$key]['icon'] = $icon->getContent(); } } - } catch (NotFoundException $e) { + } catch (NotFoundException | NotPermittedException $e) { } } return $list;