summaryrefslogtreecommitdiffstats
path: root/lib/private/AppFramework
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2022-06-22 15:53:12 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2022-06-22 21:58:13 +0200
commit523572fcea39814794399aab46239e068ba54a22 (patch)
tree63f74df8850157427389a0b3cb935c565b8ec793 /lib/private/AppFramework
parentb282fe1e6f5587a6440d170df245ad5acb8dc976 (diff)
downloadnextcloud-server-523572fcea39814794399aab46239e068ba54a22.tar.gz
nextcloud-server-523572fcea39814794399aab46239e068ba54a22.zip
load widgets only of enabled apps
- per design, all enabled apps have their registration run - limitations, e.g. enabled by group, are not considered in that state, because we do not have a session (and might need apps?) - before instantiation of widget it has to be checked whether the providing app is actually enabled for the logged in user. - a public interface is being changed, but it is not meant to be implemented or used outside of the core handling. Therefore save to backport. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/AppFramework')
-rw-r--r--lib/private/AppFramework/Bootstrap/Coordinator.php2
-rw-r--r--lib/private/AppFramework/Bootstrap/RegistrationContext.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/AppFramework/Bootstrap/Coordinator.php b/lib/private/AppFramework/Bootstrap/Coordinator.php
index b6378830732..3ab6ac4c8b0 100644
--- a/lib/private/AppFramework/Bootstrap/Coordinator.php
+++ b/lib/private/AppFramework/Bootstrap/Coordinator.php
@@ -151,7 +151,7 @@ class Coordinator {
*/
$this->registrationContext->delegateCapabilityRegistrations($apps);
$this->registrationContext->delegateCrashReporterRegistrations($apps, $this->registry);
- $this->registrationContext->delegateDashboardPanelRegistrations($apps, $this->dashboardManager);
+ $this->registrationContext->delegateDashboardPanelRegistrations($this->dashboardManager);
$this->registrationContext->delegateEventListenerRegistrations($this->eventDispatcher);
$this->registrationContext->delegateContainerRegistrations($apps);
$this->registrationContext->delegateMiddlewareRegistrations($apps);
diff --git a/lib/private/AppFramework/Bootstrap/RegistrationContext.php b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
index 7b4d24036e8..8f6aff228e1 100644
--- a/lib/private/AppFramework/Bootstrap/RegistrationContext.php
+++ b/lib/private/AppFramework/Bootstrap/RegistrationContext.php
@@ -475,10 +475,10 @@ class RegistrationContext {
/**
* @param App[] $apps
*/
- public function delegateDashboardPanelRegistrations(array $apps, IManager $dashboardManager): void {
+ public function delegateDashboardPanelRegistrations(IManager $dashboardManager): void {
while (($panel = array_shift($this->dashboardPanels)) !== null) {
try {
- $dashboardManager->lazyRegisterWidget($panel->getService());
+ $dashboardManager->lazyRegisterWidget($panel->getService(), $panel->getAppId());
} catch (Throwable $e) {
$appId = $panel->getAppId();
$this->logger->error("Error during dashboard registration of $appId: " . $e->getMessage(), [