Rebuild OMSORG Connect from scratch: login-only milestone
New omsorgWeb/mitarbeiter-app/ replaces the legacy PHP app for now with just the login flow, built fresh instead of incrementally refactored. Reuses the already-working omsorgCore JWT auth pattern (login, silent refresh, session-stored token pair, /api/auth/me for role+permissions) but drops everything legacy carried alongside it: no local MySQL user cache, no admin/user-management endpoints, no admin UI. Employee/user management stays exclusive to OMSORG Desktop per architecture decision - Connect only ever acts on the current user's own session. logout.php additionally revokes the refresh token server-side via omsorgcore_logout(), which the legacy version never did. Verified end-to-end against a running omsorgCore instance: login, dashboard via /api/auth/me, logout + token revocation, unauth redirect, and wrong-credential error handling. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
b6c1389c55
commit
ee74ed65f5
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
// Minimale Hülle für dieses Milestone - nur Dashboard im Nav, keine Admin-Sichtbarkeit
|
||||
// (Connect hat kategorisch keine Admin-Oberfläche, siehe CLAUDE.md).
|
||||
function layout_start(string $title): void {
|
||||
$name = current_name();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title><?= e($title) ?></title>
|
||||
<link rel="stylesheet" href="../app.css">
|
||||
<meta name="csrf-token" content="<?= csrf_token() ?>">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="dashboard-layout">
|
||||
|
||||
<aside class="sidebar glass">
|
||||
<div class="sidebar-brand">
|
||||
<img src="../assets/omsorg-wordmark-new.png" alt="OMSORG">
|
||||
<span class="sidebar-app-name">Mitarbeiter-App</span>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-user">
|
||||
<div class="sidebar-avatar"><?= e(mb_substr($name, 0, 1)) ?></div>
|
||||
<div>
|
||||
<b><?= e($name) ?></b>
|
||||
<small><?= e(current_role()) ?></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav class="sidebar-nav">
|
||||
<a href="dashboard.php" class="active">
|
||||
<span class="nav-icon">⊞</span><span class="nav-label"> Dashboard</span>
|
||||
</a>
|
||||
</nav>
|
||||
|
||||
<div class="sidebar-footer">
|
||||
<a href="../actions/logout.php" class="sidebar-logout">Abmelden</a>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<main class="main-content">
|
||||
<div class="main-inner">
|
||||
<?php
|
||||
}
|
||||
|
||||
function layout_end(): void {
|
||||
?>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
Reference in New Issue
Block a user