nexus base
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-15 01:19:31 +02:00
parent 52158ef041
commit 3ed4fba58c
12 changed files with 1975 additions and 29 deletions

View File

@@ -24,9 +24,12 @@ $publicPaths = [
'auth/me',
'module/pi_control/terminal_info',
];
$requiresGlobalAuth = in_array($uriPath, ['settings', 'users', 'modules', 'modules/install', 'modules/sql-import', 'debug', 'exports/database.sql'], true)
$requiresGlobalAuth = in_array($uriPath, ['settings', 'users', 'modules', 'modules/install', 'modules/sql-import', 'debug', 'exports/database.sql', 'dashboard', 'dashboards', 'integrations', 'page-modules'], true)
|| str_starts_with($uriPath, 'modules/setup/')
|| str_starts_with($uriPath, 'modules/access/');
if (str_starts_with($uriPath, 'page-modules/view/')) {
$requiresGlobalAuth = true;
}
if (defined('APP_AUTH_ENABLED') && APP_AUTH_ENABLED && $requiresGlobalAuth && !in_array($uriPath, $publicPaths, true)) {
$user = auth_user();
if (!$user) {
@@ -274,6 +277,17 @@ if (str_starts_with($uriPath, 'modules/install')) {
$target = $pagesBase . '/users/settings.php';
} elseif ($uriPath === 'users') {
$target = $pagesBase . '/users/index.php';
} elseif ($uriPath === 'dashboard') {
$target = $pagesBase . '/dashboard.php';
} elseif ($uriPath === 'dashboards') {
$target = $pagesBase . '/dashboards.php';
} elseif ($uriPath === 'integrations') {
$target = $pagesBase . '/integrations.php';
} elseif ($uriPath === 'page-modules') {
$target = $pagesBase . '/page_modules.php';
} elseif (preg_match('~^page-modules/view/(\d+)$~', $uriPath, $pageModuleMatch)) {
$_GET['id'] = (string) $pageModuleMatch[1];
$target = $pagesBase . '/page_modules_view.php';
} elseif ($uriPath === 'debug') {
$target = $pagesBase . '/retool/debug.php';
} elseif (preg_match('~^module/([a-zA-Z0-9_-]+)(?:/(.+))?$~', $uriPath, $m)) {