Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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 <[email protected]>
  • Loading branch information
come-nc committed Jun 5, 2025
commit bb485fb733e215f28c3497e7f1ef49bb0047c1f4
4 changes: 2 additions & 2 deletions lib/private/Route/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function __construct(
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';
Expand Down Expand Up @@ -117,7 +117,7 @@ public function loadRoutes($app = null) {
$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');
Expand Down
Loading