Berarbeiter dürfen Stundenbuchung löschen
This commit is contained in:
@@ -629,7 +629,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$notice = 'Stunden gebucht.';
|
||||
}
|
||||
|
||||
if ($user && $action === 'delete_booking' && ($user['role'] ?? '') === 'admin' && $pdo) {
|
||||
if ($user && $action === 'delete_booking' && hasRole($user, ['editor', 'admin']) && $pdo) {
|
||||
$bookingId = (int)($_POST['booking_id'] ?? 0);
|
||||
$stmt = $pdo->prepare('DELETE FROM work_logs WHERE id = ?');
|
||||
$stmt->execute([$bookingId]);
|
||||
|
||||
Reference in New Issue
Block a user