Compare commits

...

2 Commits

Author SHA1 Message Date
Felix Ivo
c0bd9b7e8a Merge branch 'main' of http://git.pb.bib.de/PBBFA23CIV/EIANotesApp 2025-06-16 13:56:04 +02:00
Felix Ivo
020bdc8c89 user id and role is handled by session 2025-06-16 13:55:54 +02:00

View File

@ -20,8 +20,8 @@ class NotesController
{
$sortBy = $_GET['sort_by'] ?? 'updated_at';
$sortOrder = strtoupper($_GET['sort_order'] ?? 'DESC');
$isAdmin = false;
$userid = 2; //$_SESSION['user_id'];
$isAdmin = $_SESSION['role'] === 'admin';
$userid = $_SESSION['user_id'];
$this->view->setVars([
"notes" => $this->notesModel->selectNotesForUser($userid, $isAdmin, $sortBy, $sortOrder)