fix(NavigationManager): only resolve navigations of booted apps#61120
fix(NavigationManager): only resolve navigations of booted apps#61120susnux wants to merge 2 commits into
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
We discovered more issues, will work on it. |
0ccc152 to
b838ee0
Compare
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
…tion Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
281ccd1 to
e870c6f
Compare
|
|
||
| public function __construct( | ||
| private readonly IL10N $l10n, | ||
| private readonly IAppManager $appManger, |
There was a problem hiding this comment.
| private readonly IAppManager $appManger, | |
| private readonly IAppManager $appManager, |
| if (!$this->userSession->isLoggedIn()) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Not needed, there is already the null check on $user in the child function
| return; | ||
| } | ||
|
|
||
| if ($this->appManger->isAppLoaded(Application::APP_ID)) { |
There was a problem hiding this comment.
Why is it needed to check that? Could you add a comment explaining we need the settings application to be loaded and why. (reading the code it’s not obvious this is the settings application)
| if (!$this->userSession->isLoggedIn()) { | ||
| return; | ||
| } |
| public function __construct( | ||
| private readonly IConfig $config, | ||
| private readonly IL10N $l10n, | ||
| private readonly IAppManager $appManger, |
There was a problem hiding this comment.
| private readonly IAppManager $appManger, | |
| private readonly IAppManager $appManager, |
What’s a manger 🙃
| return; | ||
| } | ||
|
|
||
| if ($this->appManger->isAppLoaded(Application::APP_ID)) { |
There was a problem hiding this comment.
Is it possible this get called when settings is not loaded? This listener is registered by the settings application.
|
|
||
| public function __construct( | ||
| public readonly IFactory $l10nFactory, | ||
| private readonly IAppManager $appManger, |
| if (!$this->userSession->isLoggedIn()) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
This one may be needed as it’s not checked in the method.
| */ | ||
| private function registerNavigationEntries(): void { | ||
| // Register the logout button in the user settings | ||
| $logoutUrl = \OC_User::getLogoutUrl($this->urlGenerator); |
| // we do not really know the current bootstrapping state | ||
| // but we know that the files app is always enabled and loaded when "filesystem" is loaded thus the server is ready or close-to-ready. |
There was a problem hiding this comment.
🥷 Not sure I like that. But not sure I have a better idea.
Summary
Prevent log flooded with "route not found"
Checklist
3. to review, feature component)stable32)AI (if applicable)