diff --git a/src/projects.php b/src/projects.php index e7c7176..1379e5e 100644 --- a/src/projects.php +++ b/src/projects.php @@ -23,7 +23,6 @@ function handleGetProjects() { $role = $_SESSION['role'] ?? 'user'; $userId = $_SESSION['user_id']; - // BUGFIX: Normale User sehen nur Projekte, die ihnen zugewiesen sind! if ($role === 'admin' || $role === 'pm') { $stmt = $pdo->query(" SELECT p.*, u.username as assigned_username, diff --git a/src/router.php b/src/router.php index 4e76fd6..038f80b 100644 --- a/src/router.php +++ b/src/router.php @@ -1,11 +1,12 @@ true, 'status' => 'online', 'system' => 'CorePlan']); } elseif ($path === '/api/logs' && $method === 'GET') { handleGetLogs(); } elseif ($path === '/api/settings' && $method === 'GET') { handleGetSettings(); @@ -25,7 +26,7 @@ if ($path === '/' || $path === '') { header('Content-Type: text/html'); readfile } elseif ($path === '/api/projects/extend' && $method === 'POST') { handleExtendProject(); } elseif ($path === '/api/projects/assign' && $method === 'POST') { handleAssignProject(); } elseif ($path === '/api/projects/delete' && $method === 'POST') { handleDeleteProject(); -} elseif ($path === '/api/projects/report' && $method === 'GET') { handleGetProjectReport(); // NEU +} elseif ($path === '/api/projects/report' && $method === 'GET') { handleGetProjectReport(); // NEU: Der Report Button Endpunkt } elseif ($path === '/api/tasks' && $method === 'GET') { handleGetTasks(); } elseif ($path === '/api/tasks/create' && $method === 'POST') { handleCreateTask(); } elseif ($path === '/api/tasks/toggle' && $method === 'POST') { handleToggleTask();