aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2025-06-05 18:06:08 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2025-06-05 18:06:08 +0200
commitbb485fb733e215f28c3497e7f1ef49bb0047c1f4 (patch)
tree090e847ebf9acd1fef914e63073c8e9bb27ddf6c
parent12e7f46b30caf35c1199910ca5281a2f2566ff8a (diff)
downloadnextcloud-server-bb485fb733e215f28c3497e7f1ef49bb0047c1f4.tar.gz
nextcloud-server-bb485fb733e215f28c3497e7f1ef49bb0047c1f4.zip
fix: Load all partially enabled apps routes
This avoids cache issues if some apps are only enabled for some groups, by loading the routes from all apps enabled for anyone, not only the current user. If the queried application is disabled for the current user based on groups, the middleware will cancel the query. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--lib/private/Route/Router.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Route/Router.php b/lib/private/Route/Router.php
index 5d0f46d6268..02f371e808a 100644
--- a/lib/private/Route/Router.php
+++ b/lib/private/Route/Router.php
@@ -82,7 +82,7 @@ class Router implements IRouter {
public function getRoutingFiles() {
if ($this->routingFiles === null) {
$this->routingFiles = [];
- foreach (\OC_APP::getEnabledApps() as $app) {
+ foreach ($this->appManager->getEnabledApps() as $app) {
try {
$appPath = $this->appManager->getAppPath($app);
$file = $appPath . '/appinfo/routes.php';
@@ -117,7 +117,7 @@ class Router implements IRouter {
$routingFiles = $this->getRoutingFiles();
$this->eventLogger->start('route:load:attributes', 'Loading Routes from attributes');
- foreach (\OC_App::getEnabledApps() as $enabledApp) {
+ foreach ($this->appManager->getEnabledApps() as $enabledApp) {
$this->loadAttributeRoutes($enabledApp);
}
$this->eventLogger->end('route:load:attributes');