Files
Felix KemmlerandClaude Sonnet 5 b6c1389c55 Reorganize into monorepo layout, move mitarbeiter-app to legacy reference
Consolidates the previously separate omsorgapp and omsorgCore repos
(each had their own nested .git with GitHub history) plus the old
root-level website/mitarbeiter-app into a single monorepo, matching
the structure already documented in the root CLAUDE.md. Also moves
the PHP employee app aside as omsorgWeb/mitarbeiter-app-legacy/ to
serve as a template for a ground-up rewrite.

Fixes .gitignore in the same pass: the config-secrets/uploads/data
patterns were unanchored (relative to repo root, not depth-agnostic),
so they silently stopped matching once the app moved under omsorgWeb/.
Patterns are now **/-prefixed and cover both mitarbeiter-app and
mitarbeiter-app-legacy, keeping DB/SMTP credentials and uploaded
employee documents out of version control.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-07 14:21:37 +02:00

76 lines
2.5 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
require_once __DIR__ . '/../lib/auth.php';
require_login();
$error = '';
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$current = $_POST['current_password'] ?? '';
$new = $_POST['new_password'] ?? '';
$repeat = $_POST['new_password_repeat'] ?? '';
if (strlen($new) < 8) {
$error = 'Das neue Passwort muss mindestens 8 Zeichen lang sein.';
} elseif ($new !== $repeat) {
$error = 'Die Passwörter stimmen nicht überein.';
} else {
$result = omsorgcore_change_password(_omsorgcore_config(), $_SESSION['omsorgcore_access_token'], $current, $new);
if ($result['ok']) {
// Serverseitig wurden alle Sessions widerrufen (siehe UserService.ChangeOwnPasswordAsync) -
// die aktuelle Session ist damit tot, neuer Login mit dem neuen Passwort ist nötig.
_clear_omsorgcore_session();
header('Location: ../index.php?pwchanged=1');
exit;
}
$error = $result['status'] === 401
? 'Aktuelles Passwort ist falsch.'
: 'Passwort konnte nicht geändert werden.';
}
}
?>
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>OMSORG Felix Passwort ändern</title>
<link rel="stylesheet" href="../app.css">
</head>
<body>
<div class="login-page">
<div class="login-card glass">
<h2 style="font-family:'KindelSerif',Georgia,serif;font-size:1.5rem;margin:0 0 6px">Passwort ändern erforderlich</h2>
<p class="hint" style="margin:0 0 22px">
Für deinen Account wurde ein initiales Passwort vergeben. Lege jetzt dein eigenes Passwort fest,
bevor du weiterarbeiten kannst.
</p>
<?php if ($error): ?>
<div class="error" style="margin-bottom:16px"><?= e($error) ?></div>
<?php endif; ?>
<form method="post">
<?= csrf_field() ?>
<label>
Aktuelles Passwort
<input type="password" name="current_password" autocomplete="current-password" required autofocus>
</label>
<label>
Neues Passwort
<input type="password" name="new_password" autocomplete="new-password" required minlength="8">
</label>
<label>
Neues Passwort wiederholen
<input type="password" name="new_password_repeat" autocomplete="new-password" required minlength="8">
</label>
<button type="submit" class="btn" style="width:100%;margin-top:6px">Passwort ändern</button>
</form>
</div>
</div>
</body>
</html>