Datenschutz-Einwilligung und externe Inhalte absichern
This commit is contained in:
parent
bdd3a86edb
commit
c37dc18b3e
29 changed files with 1662 additions and 34 deletions
10
DEPLOY.md
10
DEPLOY.md
|
|
@ -111,14 +111,20 @@ verschlüsseltes Backup-Ziel).
|
|||
|
||||
## Datenbank-Migrationen
|
||||
|
||||
Nach Schemaänderungen – z. B. für den Tour-Chat – die idempotente Migration
|
||||
ausführen:
|
||||
Nach Schemaänderungen – z. B. für den Tour-Chat oder die Datenschutz-
|
||||
Einwilligung – die idempotente Migration ausführen:
|
||||
|
||||
```bash
|
||||
cd ~/repos/motorradig2027
|
||||
python3 tools/migrate_motorradig.py
|
||||
```
|
||||
|
||||
Für die Datenschutz-Funktion werden die Spalten
|
||||
`users.privacy_consent_at`, `users.privacy_consent_version` und
|
||||
`users.privacy_external_media` angelegt. Ohne diese Migration bleibt die
|
||||
Website über den Cookie-Fallback nutzbar; die Zustimmung wird dann aber nicht
|
||||
am Benutzerkonto gespeichert.
|
||||
|
||||
## Reguläres Deployment (alle App-Dateien)
|
||||
|
||||
```bash
|
||||
|
|
|
|||
BIN
docs/Stellungnahme_Datenschutz_App.pdf
Normal file
BIN
docs/Stellungnahme_Datenschutz_App.pdf
Normal file
Binary file not shown.
|
|
@ -13,3 +13,17 @@ DB_PASSWORD=mig_password
|
|||
VAPID_PUBLIC_KEY=
|
||||
VAPID_PRIVATE_KEY=
|
||||
VAPID_SUBJECT=mailto:ig@fischergruppe.de
|
||||
|
||||
# Datenschutz / Impressum (an die tatsächlichen Vereinsangaben anpassen)
|
||||
# Bei inhaltlichen Änderungen der Datenschutzhinweise PRIVACY_VERSION erhöhen
|
||||
# (Format JJJJ-MM-TT; wird auch als Stand-Datum angezeigt).
|
||||
PRIVACY_VERSION=2026-11-10
|
||||
PRIVACY_CONTROLLER_NAME=Motorrad-IG Deutschland
|
||||
PRIVACY_CONTROLLER_ADDRESS=Ross Walsh, Neckar Str. 23, 45219 Essen
|
||||
PRIVACY_CONTROLLER_EMAIL=ig@fischergruppe.de
|
||||
PRIVACY_CONTROLLER_PHONE=02054 920343
|
||||
PRIVACY_REPRESENTED_BY=Ross Walsh
|
||||
PRIVACY_REGISTER_COURT=
|
||||
PRIVACY_REGISTER_NUMBER=
|
||||
PRIVACY_RESPONSIBLE_CONTENT=Ross Walsh, Neckar Str. 23, 45219 Essen
|
||||
PRIVACY_HOSTING_PROVIDER=
|
||||
|
|
|
|||
|
|
@ -29,6 +29,32 @@ Geschützte Dateien unter `/img_storage/` werden bewusst nicht gecacht.
|
|||
Bei Änderungen an den vorgeladenen Dateien `CACHE_VERSION` in `public/sw.js`
|
||||
erhöhen, damit alte Caches ersetzt werden.
|
||||
|
||||
### Datenschutz und Einwilligungen
|
||||
|
||||
Beim ersten Start erscheint ein blockierender Datenschutzdialog. Nutzer müssen
|
||||
die Datenschutzhinweise bestätigen, bevor sie das Portal verwenden können.
|
||||
Optional kann zusätzlich die Freigabe für externe Inhalte (Google Maps,
|
||||
YouTube) erteilt werden. Der Button „App installieren“ wird erst nach der
|
||||
Zustimmung eingeblendet.
|
||||
|
||||
- Angemeldete Benutzer speichern die Zustimmung in `users.privacy_consent_at`,
|
||||
`users.privacy_consent_version` und `users.privacy_external_media`.
|
||||
- Gäste speichern die Zustimmung im HttpOnly-Cookie `mig_privacy_consent`
|
||||
(ein Jahr gültig).
|
||||
- Der Widerruf ist unter `/datenschutz` und in den Profileinstellungen möglich.
|
||||
- `PRIVACY_VERSION` in `.env` erhöhen, wenn sich die Datenschutzhinweise
|
||||
inhaltlich ändern. Dann werden alle Nutzer erneut zur Zustimmung aufgefordert.
|
||||
- Google Maps und YouTube werden erst nach einem Klick geladen
|
||||
(`public/js/privacy.js`). YouTube wird dabei über `youtube-nocookie.com`
|
||||
eingebunden. Externe iframes in den redaktionellen Seiteninhalten werden
|
||||
durch `privacy_filter_embeds()` automatisch ersetzt.
|
||||
|
||||
Die Schemaänderungen werden mit `bin/migrate.php` (lokal/Docker) bzw.
|
||||
`tools/migrate_motorradig.py` (Produktion) angelegt. Die Texte für
|
||||
Datenschutz und Impressum liegen in `views/privacy.php` und `views/imprint.php`;
|
||||
die Stammdaten lassen sich über die `PRIVACY_*`-Variablen in `.env` anpassen.
|
||||
Die rechtliche Endabnahme der Texte bleibt Aufgabe des Vereins.
|
||||
|
||||
### Push-Benachrichtigungen (VAPID)
|
||||
|
||||
Auf dem Smartphone können Benutzer in ihren eigenen Profil-Einstellungen
|
||||
|
|
|
|||
|
|
@ -141,6 +141,20 @@ if (!tableExists($pdo, 'push_subscriptions')) {
|
|||
$out("Tabelle 'push_subscriptions' existiert bereits (übersprungen)");
|
||||
}
|
||||
|
||||
// Datenschutz-Einwilligung: Spalten in users ergänzen
|
||||
foreach ([
|
||||
['privacy_consent_at', 'ALTER TABLE `users` ADD COLUMN `privacy_consent_at` datetime NULL DEFAULT NULL'],
|
||||
['privacy_consent_version', 'ALTER TABLE `users` ADD COLUMN `privacy_consent_version` varchar(32) NULL DEFAULT NULL'],
|
||||
['privacy_external_media', 'ALTER TABLE `users` ADD COLUMN `privacy_external_media` tinyint(1) NOT NULL DEFAULT 0'],
|
||||
] as [$column, $sql]) {
|
||||
if (!columnExists($pdo, 'users', $column)) {
|
||||
$pdo->exec($sql);
|
||||
$out("Spalte 'users.$column' angelegt");
|
||||
} else {
|
||||
$out("Spalte 'users.$column' existiert bereits");
|
||||
}
|
||||
}
|
||||
|
||||
// Tour-Chat: Nachrichten
|
||||
if (!tableExists($pdo, 'tour_messages')) {
|
||||
$pdo->exec('CREATE TABLE `tour_messages` (
|
||||
|
|
|
|||
|
|
@ -1127,3 +1127,282 @@ body .datepicker-footer {
|
|||
max-width: 92%;
|
||||
}
|
||||
}
|
||||
|
||||
/* =========================================================
|
||||
Datenschutz / Einwilligung
|
||||
========================================================= */
|
||||
body.privacy-modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.privacy-consent-modal {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
inset: 0;
|
||||
z-index: 2050;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem;
|
||||
background: rgba(8, 15, 24, .78);
|
||||
-webkit-backdrop-filter: blur(3px);
|
||||
backdrop-filter: blur(3px);
|
||||
}
|
||||
|
||||
.privacy-consent-dialog {
|
||||
width: 680px;
|
||||
max-width: 100%;
|
||||
width: min(680px, 100%);
|
||||
max-height: calc(100vh - 2rem);
|
||||
padding: clamp(1.25rem, 4vw, 2.25rem);
|
||||
overflow-y: auto;
|
||||
color: #1f2933;
|
||||
background: #ffffff;
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
|
||||
}
|
||||
|
||||
.privacy-consent-kicker {
|
||||
margin: 0 0 .35rem;
|
||||
color: #0b7285;
|
||||
font-size: .72rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: .16em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.privacy-consent-dialog h2 {
|
||||
margin: 0 0 .75rem;
|
||||
color: #12344d;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 700;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.privacy-consent-dialog > p {
|
||||
font-size: .95rem;
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
.privacy-consent-list {
|
||||
margin: 0 0 1rem;
|
||||
padding-left: 1.15rem;
|
||||
color: #334155;
|
||||
font-size: .93rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.privacy-consent-list li {
|
||||
margin-bottom: .45rem;
|
||||
}
|
||||
|
||||
.privacy-consent-check {
|
||||
padding: .8rem .9rem .8rem 2.4rem;
|
||||
margin-bottom: .75rem;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.privacy-consent-check .form-check-input {
|
||||
margin-top: .2rem;
|
||||
margin-left: -1.5rem;
|
||||
}
|
||||
|
||||
.privacy-consent-check .form-check-label {
|
||||
font-size: .93rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.privacy-consent-hint {
|
||||
margin: .25rem 0 0;
|
||||
color: #64748b;
|
||||
font-size: .82rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.privacy-consent-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: .6rem;
|
||||
margin-top: 1.1rem;
|
||||
}
|
||||
|
||||
.privacy-consent-small {
|
||||
margin: 1rem 0 0;
|
||||
color: #64748b;
|
||||
font-size: .78rem;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.privacy-footer {
|
||||
margin-top: 1rem;
|
||||
padding: 1.25rem 1rem 1.5rem;
|
||||
color: rgba(255, 255, 255, .82);
|
||||
font-size: .85rem;
|
||||
text-align: center;
|
||||
background: rgba(13, 17, 23, .45);
|
||||
}
|
||||
|
||||
.privacy-footer a {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, .4);
|
||||
}
|
||||
|
||||
.privacy-footer a:hover,
|
||||
.privacy-footer a:focus {
|
||||
color: #ffffff;
|
||||
border-bottom-color: #ffffff;
|
||||
}
|
||||
|
||||
.privacy-footer-sep {
|
||||
padding: 0 .55rem;
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
.privacy-page {
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
|
||||
.privacy-page-lead {
|
||||
max-width: 820px;
|
||||
margin: 0 auto 1rem;
|
||||
color: rgba(255, 255, 255, .82);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.privacy-text h2 {
|
||||
margin: 1.8rem 0 .65rem;
|
||||
padding-bottom: .35rem;
|
||||
color: #12344d;
|
||||
font-size: 1.2rem;
|
||||
font-weight: 700;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
.privacy-text h2:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.privacy-text p,
|
||||
.privacy-text li {
|
||||
color: #334155;
|
||||
font-size: .96rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.privacy-text ul {
|
||||
padding-left: 1.2rem;
|
||||
}
|
||||
|
||||
.privacy-text code {
|
||||
padding: .1rem .3rem;
|
||||
color: #0b7285;
|
||||
background: #f1f5f9;
|
||||
border-radius: 4px;
|
||||
font-size: .88em;
|
||||
}
|
||||
|
||||
.privacy-embed {
|
||||
margin: 1rem 0;
|
||||
overflow: hidden;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #d9e2ec;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.privacy-embed-placeholder {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: .35rem;
|
||||
min-height: 220px;
|
||||
padding: 1.5rem;
|
||||
color: #334155;
|
||||
text-align: center;
|
||||
background: linear-gradient(135deg, #f8fafc, #eef2f7);
|
||||
}
|
||||
|
||||
.privacy-embed-placeholder strong {
|
||||
color: #12344d;
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
.privacy-embed-placeholder p {
|
||||
max-width: 560px;
|
||||
margin: 0;
|
||||
color: #52606d;
|
||||
font-size: .9rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.privacy-embed-placeholder .btn {
|
||||
margin-top: .5rem;
|
||||
}
|
||||
|
||||
.privacy-embed iframe {
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-height: 360px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.privacy-embed--map iframe {
|
||||
min-height: 320px;
|
||||
}
|
||||
|
||||
.privacy-embed--video .privacy-embed-placeholder,
|
||||
.privacy-embed--video iframe {
|
||||
aspect-ratio: 16 / 9;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.privacy-embed--video iframe {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.privacy-embed.is-loaded {
|
||||
background: #000000;
|
||||
border-color: #000000;
|
||||
}
|
||||
|
||||
@media (max-width: 575.98px) {
|
||||
.privacy-consent-modal {
|
||||
padding: .5rem;
|
||||
}
|
||||
|
||||
.privacy-consent-dialog {
|
||||
max-height: calc(100vh - 1rem);
|
||||
padding: 1rem;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.privacy-consent-dialog h2 {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
|
||||
.privacy-consent-actions .btn {
|
||||
flex: 1 1 100%;
|
||||
}
|
||||
|
||||
.privacy-embed-placeholder {
|
||||
min-height: 200px;
|
||||
padding: 1.1rem;
|
||||
}
|
||||
|
||||
.privacy-embed iframe,
|
||||
.privacy-embed--map iframe {
|
||||
min-height: 260px;
|
||||
}
|
||||
}
|
||||
|
||||
#einwilligung,
|
||||
#externe-inhalte {
|
||||
scroll-margin-top: 80px;
|
||||
}
|
||||
|
|
|
|||
76
motorradig/public/js/privacy.js
Normal file
76
motorradig/public/js/privacy.js
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
(function () {
|
||||
'use strict';
|
||||
|
||||
// Externe Inhalte (Google Maps, YouTube) erst nach einem Klick laden.
|
||||
document.addEventListener('click', function (event) {
|
||||
var target = event.target;
|
||||
|
||||
if (!target || typeof target.closest !== 'function') {
|
||||
return;
|
||||
}
|
||||
|
||||
var button = target.closest('[data-load-embed]');
|
||||
|
||||
if (!button) {
|
||||
return;
|
||||
}
|
||||
|
||||
var wrapper = button.closest('[data-privacy-embed]');
|
||||
var src = wrapper ? wrapper.getAttribute('data-src') : '';
|
||||
|
||||
if (!wrapper || !src) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.src = src;
|
||||
iframe.title = wrapper.getAttribute('data-title') || 'Externer Inhalt';
|
||||
iframe.loading = 'lazy';
|
||||
iframe.referrerPolicy = 'no-referrer-when-downgrade';
|
||||
iframe.allowFullscreen = true;
|
||||
|
||||
if (wrapper.classList.contains('privacy-embed--video')) {
|
||||
iframe.allow = 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share';
|
||||
}
|
||||
|
||||
wrapper.innerHTML = '';
|
||||
wrapper.appendChild(iframe);
|
||||
wrapper.classList.add('is-loaded');
|
||||
});
|
||||
|
||||
// Der Einwilligungsdialog lässt sich nicht wegklicken. Der Fokus bleibt
|
||||
// innerhalb des Dialogs, damit die Zustimmung bewusst erfolgt.
|
||||
var modal = document.getElementById('privacy-consent-modal');
|
||||
|
||||
if (!modal) {
|
||||
return;
|
||||
}
|
||||
|
||||
var selector = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
||||
var focusable = Array.prototype.slice.call(modal.querySelectorAll(selector));
|
||||
|
||||
if (focusable.length > 0) {
|
||||
window.setTimeout(function () {
|
||||
focusable[0].focus();
|
||||
}, 50);
|
||||
}
|
||||
|
||||
modal.addEventListener('keydown', function (event) {
|
||||
if (event.key !== 'Tab' || focusable.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var first = focusable[0];
|
||||
var last = focusable[focusable.length - 1];
|
||||
|
||||
if (event.shiftKey && document.activeElement === first) {
|
||||
event.preventDefault();
|
||||
last.focus();
|
||||
} else if (!event.shiftKey && document.activeElement === last) {
|
||||
event.preventDefault();
|
||||
first.focus();
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
'use strict';
|
||||
|
||||
var CACHE_VERSION = 'motorradig-static-v2';
|
||||
var CACHE_VERSION = 'motorradig-static-v3';
|
||||
var OFFLINE_URL = '/offline.html';
|
||||
|
||||
var PRECACHE_URLS = [
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace App\Controllers;
|
||||
|
||||
use App\Core\Auth;
|
||||
use App\Core\Privacy;
|
||||
use App\Models\User;
|
||||
|
||||
class AuthController
|
||||
|
|
@ -215,6 +216,8 @@ class AuthController
|
|||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
Privacy::adoptGuestConsent((int) $user->id);
|
||||
|
||||
Auth::login($user);
|
||||
|
||||
redirect('/');
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class HomeController
|
|||
|
||||
// Führende/abschließende Anführungszeichen entfernen (wie im Original)
|
||||
$content = rtrim(ltrim($content, '"'), '"');
|
||||
$content = privacy_filter_embeds($content);
|
||||
|
||||
view('home', ['content' => $content]);
|
||||
}
|
||||
|
|
@ -25,7 +26,7 @@ class HomeController
|
|||
{
|
||||
$page = Page::byName('activities');
|
||||
|
||||
view('activities', ['content' => $page->content ?? '']);
|
||||
view('activities', ['content' => privacy_filter_embeds($page->content ?? '')]);
|
||||
}
|
||||
|
||||
public function meetings(): void
|
||||
|
|
|
|||
79
motorradig/src/Controllers/PrivacyController.php
Normal file
79
motorradig/src/Controllers/PrivacyController.php
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Controllers;
|
||||
|
||||
use App\Core\Privacy;
|
||||
|
||||
class PrivacyController
|
||||
{
|
||||
public function show(): void
|
||||
{
|
||||
view('privacy', [
|
||||
'state' => Privacy::state(),
|
||||
'privacyError' => flash_pull('privacy_error'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function imprint(): void
|
||||
{
|
||||
view('imprint');
|
||||
}
|
||||
|
||||
public function storeConsent(): void
|
||||
{
|
||||
$returnTo = Privacy::returnPath('/');
|
||||
$alreadyAccepted = Privacy::accepted();
|
||||
|
||||
if (!$alreadyAccepted && input('privacy_notice') !== '1') {
|
||||
flash_set('privacy_error', 'Bitte bestätige die Datenschutzhinweise, bevor du fortfährst.');
|
||||
redirect($returnTo);
|
||||
}
|
||||
|
||||
$mode = (string) input('consent_mode', 'essential');
|
||||
$externalMedia = $mode === 'all' && input('external_media') === '1';
|
||||
|
||||
if (!Privacy::store($externalMedia)) {
|
||||
flash_set('privacy_error', 'Die Einwilligung konnte nicht gespeichert werden. Bitte versuche es erneut.');
|
||||
redirect($returnTo);
|
||||
}
|
||||
|
||||
flash_set('privacy_status', $externalMedia
|
||||
? 'Danke! Deine Einwilligung wurde gespeichert. Externe Inhalte dürfen geladen werden.'
|
||||
: 'Danke! Deine Einwilligung wurde gespeichert. Externe Inhalte bleiben deaktiviert.');
|
||||
|
||||
redirect($returnTo);
|
||||
}
|
||||
|
||||
public function updateExternalMedia(): void
|
||||
{
|
||||
if (!Privacy::accepted()) {
|
||||
redirect('/datenschutz');
|
||||
}
|
||||
|
||||
$returnTo = Privacy::returnPath('/datenschutz#externe-inhalte');
|
||||
$allowed = input('external_media') === '1';
|
||||
|
||||
if (!Privacy::setExternalMedia($allowed)) {
|
||||
flash_set('privacy_error', 'Die Einstellung konnte nicht gespeichert werden. Bitte versuche es erneut.');
|
||||
} else {
|
||||
flash_set('privacy_status', $allowed
|
||||
? 'Externe Inhalte (Google Maps, YouTube) sind jetzt erlaubt.'
|
||||
: 'Externe Inhalte (Google Maps, YouTube) sind jetzt deaktiviert.');
|
||||
}
|
||||
|
||||
redirect($returnTo);
|
||||
}
|
||||
|
||||
public function revoke(): void
|
||||
{
|
||||
if (!Privacy::revoke()) {
|
||||
flash_set('privacy_error', 'Die Einwilligung konnte nicht widerrufen werden. Bitte versuche es erneut.');
|
||||
redirect('/datenschutz');
|
||||
}
|
||||
|
||||
flash_set('privacy_status', 'Deine Einwilligung wurde widerrufen. Du kannst sie auf dieser Seite erneut erteilen.');
|
||||
redirect('/datenschutz');
|
||||
}
|
||||
}
|
||||
406
motorradig/src/Core/Privacy.php
Normal file
406
motorradig/src/Core/Privacy.php
Normal file
|
|
@ -0,0 +1,406 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Core;
|
||||
|
||||
/**
|
||||
* Datenschutz-Einwilligungen.
|
||||
*
|
||||
* Angemeldete Benutzer speichern ihre Zustimmung in der Datenbank, Gäste in
|
||||
* einem HttpOnly-Cookie. Die eigentliche Entscheidung über optionale externe
|
||||
* Inhalte (Google Maps, YouTube) wird separat gespeichert. Beim Erhöhen der
|
||||
* PRIVACY_VERSION werden alle Nutzer erneut zur Zustimmung aufgefordert.
|
||||
*/
|
||||
final class Privacy
|
||||
{
|
||||
private const COOKIE = 'mig_privacy_consent';
|
||||
private const COOKIE_DAYS = 365;
|
||||
|
||||
/** @var array<string, mixed>|null */
|
||||
private static ?array $state = null;
|
||||
|
||||
public static function version(): string
|
||||
{
|
||||
return (string) config('privacy.version', '2026-11-10');
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert den gespeicherten Einwilligungsstatus.
|
||||
*
|
||||
* @return array{accepted: bool, external_media: bool, accepted_at: ?string, version: ?string, source: string}
|
||||
*/
|
||||
public static function state(): array
|
||||
{
|
||||
if (self::$state !== null) {
|
||||
return self::$state;
|
||||
}
|
||||
|
||||
$empty = [
|
||||
'accepted' => false,
|
||||
'external_media' => false,
|
||||
'accepted_at' => null,
|
||||
'version' => null,
|
||||
'source' => 'none',
|
||||
];
|
||||
|
||||
$userId = Auth::id();
|
||||
|
||||
if ($userId !== null) {
|
||||
$row = null;
|
||||
$dbReadOk = false;
|
||||
|
||||
try {
|
||||
$row = db()->fetchOne(
|
||||
'SELECT privacy_consent_at, privacy_consent_version, privacy_external_media
|
||||
FROM `users` WHERE id = ? LIMIT 1',
|
||||
[$userId]
|
||||
);
|
||||
$dbReadOk = true;
|
||||
} catch (\Throwable $e) {
|
||||
app_log('warning', 'Datenschutz-Status konnte nicht aus der Datenbank gelesen werden', [
|
||||
'user_id' => $userId,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
|
||||
if ($dbReadOk) {
|
||||
if (is_array($row) && !empty($row['privacy_consent_at'])) {
|
||||
self::$state = [
|
||||
'accepted' => true,
|
||||
'external_media' => (int) ($row['privacy_external_media'] ?? 0) === 1,
|
||||
'accepted_at' => (string) $row['privacy_consent_at'],
|
||||
'version' => (string) ($row['privacy_consent_version'] ?? ''),
|
||||
'source' => 'user',
|
||||
];
|
||||
|
||||
return self::$state;
|
||||
}
|
||||
|
||||
self::$state = $empty;
|
||||
|
||||
return self::$state;
|
||||
}
|
||||
|
||||
// Falls die Migration noch nicht gelaufen ist, bleibt die Seite nutzbar.
|
||||
$cookie = self::readCookie();
|
||||
self::$state = $cookie ?? $empty;
|
||||
|
||||
return self::$state;
|
||||
}
|
||||
|
||||
$cookie = self::readCookie();
|
||||
self::$state = $cookie ?? $empty;
|
||||
|
||||
return self::$state;
|
||||
}
|
||||
|
||||
/** true, wenn die aktuelle Version der Datenschutzhinweise bestätigt wurde. */
|
||||
public static function accepted(): bool
|
||||
{
|
||||
$state = self::state();
|
||||
|
||||
return $state['accepted'] === true
|
||||
&& is_string($state['version'])
|
||||
&& hash_equals(self::version(), $state['version']);
|
||||
}
|
||||
|
||||
/** true, wenn eine Zustimmung fehlt oder veraltet ist. */
|
||||
public static function needed(): bool
|
||||
{
|
||||
return !self::accepted();
|
||||
}
|
||||
|
||||
/** true, wenn der blockierende Dialog angezeigt werden soll. */
|
||||
public static function modalRequired(): bool
|
||||
{
|
||||
if (!self::needed()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$path = rtrim(current_path(), '/') ?: '/';
|
||||
|
||||
return !in_array($path, ['/datenschutz', '/impressum'], true);
|
||||
}
|
||||
|
||||
/** true, wenn externe Inhalte (Google Maps, YouTube) geladen werden dürfen. */
|
||||
public static function externalMediaAllowed(): bool
|
||||
{
|
||||
return self::accepted() && self::state()['external_media'] === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert die Zustimmung.
|
||||
*
|
||||
* @return bool true bei erfolgreichem Speichern
|
||||
*/
|
||||
public static function store(bool $externalMedia): bool
|
||||
{
|
||||
$userId = Auth::id();
|
||||
$ok = false;
|
||||
|
||||
if ($userId !== null) {
|
||||
try {
|
||||
db()->execute(
|
||||
'UPDATE `users`
|
||||
SET privacy_consent_at = ?, privacy_consent_version = ?, privacy_external_media = ?
|
||||
WHERE id = ?',
|
||||
[now(), self::version(), $externalMedia ? 1 : 0, $userId]
|
||||
);
|
||||
|
||||
// Auch als Cookie merken, damit nach dem Logout kein neuer Dialog erscheint.
|
||||
self::writeCookie($externalMedia);
|
||||
$ok = true;
|
||||
} catch (\Throwable $e) {
|
||||
app_log('error', 'Datenschutz-Einwilligung konnte nicht gespeichert werden', [
|
||||
'user_id' => $userId,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
||||
// Fallback, damit die Seite auch ohne vollständige Migration nutzbar bleibt.
|
||||
$ok = self::writeCookie($externalMedia);
|
||||
}
|
||||
} else {
|
||||
$ok = self::writeCookie($externalMedia);
|
||||
}
|
||||
|
||||
self::$state = null;
|
||||
|
||||
if ($ok) {
|
||||
app_log('info', 'Datenschutz-Einwilligung gespeichert', [
|
||||
'user_id' => $userId,
|
||||
'version' => self::version(),
|
||||
'external_media' => $externalMedia,
|
||||
]);
|
||||
}
|
||||
|
||||
return $ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ändert nur die Freigabe für externe Inhalte.
|
||||
*
|
||||
* @return bool true bei erfolgreichem Speichern
|
||||
*/
|
||||
public static function setExternalMedia(bool $allowed): bool
|
||||
{
|
||||
$userId = Auth::id();
|
||||
$ok = false;
|
||||
|
||||
if ($userId !== null) {
|
||||
try {
|
||||
db()->execute(
|
||||
'UPDATE `users` SET privacy_external_media = ? WHERE id = ?',
|
||||
[$allowed ? 1 : 0, $userId]
|
||||
);
|
||||
|
||||
// Cookie für die Gast-Ansicht nach einem Logout synchron halten.
|
||||
$state = self::state();
|
||||
|
||||
if ($state['accepted'] && is_string($state['version'])) {
|
||||
$timestamp = $state['accepted_at'] !== null ? (int) strtotime($state['accepted_at']) : time();
|
||||
self::writeCookie($allowed, $timestamp, $state['version']);
|
||||
}
|
||||
|
||||
$ok = true;
|
||||
} catch (\Throwable $e) {
|
||||
app_log('error', 'Freigabe für externe Inhalte konnte nicht gespeichert werden', [
|
||||
'user_id' => $userId,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
||||
$state = self::state();
|
||||
|
||||
if ($state['accepted'] && is_string($state['version'])) {
|
||||
$timestamp = $state['accepted_at'] !== null ? (int) strtotime($state['accepted_at']) : time();
|
||||
$ok = self::writeCookie($allowed, $timestamp, $state['version']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$state = self::state();
|
||||
|
||||
if ($state['accepted'] && is_string($state['version'])) {
|
||||
$timestamp = $state['accepted_at'] !== null ? (int) strtotime($state['accepted_at']) : time();
|
||||
$ok = self::writeCookie($allowed, $timestamp, $state['version']);
|
||||
}
|
||||
}
|
||||
|
||||
self::$state = null;
|
||||
|
||||
if ($ok) {
|
||||
app_log('info', 'Freigabe für externe Inhalte geändert', [
|
||||
'user_id' => $userId,
|
||||
'external_media' => $allowed,
|
||||
]);
|
||||
}
|
||||
|
||||
return $ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Widerruft die Zustimmung.
|
||||
*
|
||||
* @return bool true bei erfolgreichem Speichern
|
||||
*/
|
||||
public static function revoke(): bool
|
||||
{
|
||||
$userId = Auth::id();
|
||||
$ok = true;
|
||||
|
||||
if ($userId !== null) {
|
||||
try {
|
||||
db()->execute(
|
||||
'UPDATE `users`
|
||||
SET privacy_consent_at = NULL, privacy_consent_version = NULL, privacy_external_media = 0
|
||||
WHERE id = ?',
|
||||
[$userId]
|
||||
);
|
||||
} catch (\Throwable $e) {
|
||||
$ok = false;
|
||||
app_log('error', 'Datenschutz-Einwilligung konnte nicht widerrufen werden', [
|
||||
'user_id' => $userId,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
self::clearCookie();
|
||||
self::$state = null;
|
||||
|
||||
if ($ok) {
|
||||
app_log('info', 'Datenschutz-Einwilligung widerrufen', [
|
||||
'user_id' => $userId,
|
||||
]);
|
||||
}
|
||||
|
||||
return $ok;
|
||||
}
|
||||
|
||||
/**
|
||||
* Übernimmt eine als Gast erteilte Zustimmung beim Anlegen eines Kontos.
|
||||
* Eine bereits vorhandene Zustimmung wird nicht überschrieben.
|
||||
*/
|
||||
public static function adoptGuestConsent(int $userId): void
|
||||
{
|
||||
$cookie = self::readCookie();
|
||||
|
||||
if ($cookie === null || !is_string($cookie['version']) || !hash_equals(self::version(), $cookie['version'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
db()->execute(
|
||||
'UPDATE `users`
|
||||
SET privacy_consent_at = ?, privacy_consent_version = ?, privacy_external_media = ?
|
||||
WHERE id = ? AND privacy_consent_at IS NULL',
|
||||
[
|
||||
$cookie['accepted_at'] ?? now(),
|
||||
$cookie['version'],
|
||||
$cookie['external_media'] ? 1 : 0,
|
||||
$userId,
|
||||
]
|
||||
);
|
||||
self::$state = null;
|
||||
} catch (\Throwable $e) {
|
||||
app_log('warning', 'Gast-Einwilligung konnte nicht auf das Benutzerkonto übertragen werden', [
|
||||
'user_id' => $userId,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/** Liefert einen sicheren lokalen Rücksprungpfad. */
|
||||
public static function returnPath(string $fallback = '/'): string
|
||||
{
|
||||
$path = $_POST['return_to'] ?? $fallback;
|
||||
|
||||
if (!is_string($path) || $path === '' || $path[0] !== '/') {
|
||||
return $fallback;
|
||||
}
|
||||
|
||||
if (str_starts_with($path, '//') || str_contains($path, '\\') || preg_match('#^/[a-z0-9]+:#i', $path)) {
|
||||
return $fallback;
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/** @return array{accepted: bool, external_media: bool, accepted_at: ?string, version: ?string, source: string}|null */
|
||||
private static function readCookie(): ?array
|
||||
{
|
||||
$raw = $_COOKIE[self::COOKIE] ?? null;
|
||||
|
||||
if (!is_string($raw) || $raw === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
$data = json_decode(rawurldecode($raw), true);
|
||||
|
||||
if (!is_array($data)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$version = isset($data['v']) && is_string($data['v']) ? $data['v'] : '';
|
||||
$timestamp = isset($data['at']) ? (int) $data['at'] : 0;
|
||||
|
||||
if ($version === '' || $timestamp <= 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
'accepted' => true,
|
||||
'external_media' => !empty($data['media']),
|
||||
'accepted_at' => date('Y-m-d H:i:s', $timestamp),
|
||||
'version' => $version,
|
||||
'source' => 'cookie',
|
||||
];
|
||||
}
|
||||
|
||||
private static function writeCookie(bool $externalMedia, ?int $acceptedAt = null, ?string $version = null): bool
|
||||
{
|
||||
$payload = [
|
||||
'v' => $version ?? self::version(),
|
||||
'at' => $acceptedAt ?? time(),
|
||||
'media' => $externalMedia,
|
||||
];
|
||||
|
||||
$value = rawurlencode((string) json_encode($payload, JSON_UNESCAPED_SLASHES));
|
||||
|
||||
return setcookie(self::COOKIE, $value, [
|
||||
'expires' => time() + (self::COOKIE_DAYS * 86400),
|
||||
'path' => '/',
|
||||
'secure' => self::isHttps(),
|
||||
'httponly' => true,
|
||||
'samesite' => 'Lax',
|
||||
]);
|
||||
}
|
||||
|
||||
private static function clearCookie(): void
|
||||
{
|
||||
if (isset($_COOKIE[self::COOKIE])) {
|
||||
setcookie(self::COOKIE, '', [
|
||||
'expires' => time() - 3600,
|
||||
'path' => '/',
|
||||
'secure' => self::isHttps(),
|
||||
'httponly' => true,
|
||||
'samesite' => 'Lax',
|
||||
]);
|
||||
|
||||
unset($_COOKIE[self::COOKIE]);
|
||||
}
|
||||
}
|
||||
|
||||
private static function isHttps(): bool
|
||||
{
|
||||
$https = $_SERVER['HTTPS'] ?? '';
|
||||
|
||||
if ($https !== '' && strtolower((string) $https) !== 'off') {
|
||||
return true;
|
||||
}
|
||||
|
||||
$forwarded = $_SERVER['HTTP_X_FORWARDED_PROTO'] ?? '';
|
||||
$first = strtolower(trim(explode(',', (string) $forwarded)[0]));
|
||||
|
||||
return $first === 'https';
|
||||
}
|
||||
}
|
||||
|
|
@ -46,6 +46,26 @@ return [
|
|||
'charset' => 'utf8mb4',
|
||||
],
|
||||
|
||||
/*
|
||||
* Datenschutz / Impressum.
|
||||
*
|
||||
* Die Werte lassen sich über die .env-Datei anpassen. Bei inhaltlichen
|
||||
* Änderungen der Datenschutzhinweise muss PRIVACY_VERSION erhöht werden,
|
||||
* damit alle Nutzer erneut zustimmen.
|
||||
*/
|
||||
'privacy' => [
|
||||
'version' => getenv('PRIVACY_VERSION') ?: '2026-11-10',
|
||||
'controller_name' => getenv('PRIVACY_CONTROLLER_NAME') ?: 'Motorrad-IG Deutschland',
|
||||
'controller_address' => getenv('PRIVACY_CONTROLLER_ADDRESS') ?: 'Ross Walsh, Neckar Str. 23, 45219 Essen',
|
||||
'controller_email' => getenv('PRIVACY_CONTROLLER_EMAIL') ?: 'ig@fischergruppe.de',
|
||||
'controller_phone' => getenv('PRIVACY_CONTROLLER_PHONE') ?: '02054 920343',
|
||||
'represented_by' => getenv('PRIVACY_REPRESENTED_BY') ?: 'Ross Walsh',
|
||||
'register_court' => getenv('PRIVACY_REGISTER_COURT') ?: '',
|
||||
'register_number' => getenv('PRIVACY_REGISTER_NUMBER') ?: '',
|
||||
'responsible_content' => getenv('PRIVACY_RESPONSIBLE_CONTENT') ?: 'Ross Walsh, Neckar Str. 23, 45219 Essen',
|
||||
'hosting_provider' => getenv('PRIVACY_HOSTING_PROVIDER') ?: '',
|
||||
],
|
||||
|
||||
'paths' => [
|
||||
'root' => $appRoot,
|
||||
'public' => $appRoot . '/public',
|
||||
|
|
|
|||
|
|
@ -576,3 +576,92 @@ function validate(array $rules): array
|
|||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Erzeugt einen datenschutzfreundlichen Platzhalter für externe Inhalte.
|
||||
* Der eigentliche iframe wird erst nach einem Klick (und nur mit Freigabe
|
||||
* für externe Inhalte) von public/js/privacy.js eingefügt.
|
||||
*/
|
||||
function privacy_embed(string $src, string $title, string $description = '', string $kind = 'external'): string
|
||||
{
|
||||
$kind = preg_replace('/[^a-z0-9-]/', '', strtolower($kind)) ?: 'external';
|
||||
$allowed = \App\Core\Privacy::externalMediaAllowed();
|
||||
|
||||
if ($description === '') {
|
||||
$description = 'Dieser Inhalt wird von einem externen Anbieter geladen.';
|
||||
}
|
||||
|
||||
$action = $allowed
|
||||
? '<button type="button" class="btn btn-sm btn-primary" data-load-embed>Inhalt laden</button>'
|
||||
: '<a class="btn btn-sm btn-primary" href="/datenschutz#externe-inhalte">Externe Inhalte erlauben</a>';
|
||||
|
||||
return '<div class="privacy-embed privacy-embed--' . e($kind) . '"'
|
||||
. ' data-privacy-embed data-src="' . e($src) . '" data-title="' . e($title) . '">'
|
||||
. '<div class="privacy-embed-placeholder">'
|
||||
. '<strong>' . e($title) . '</strong>'
|
||||
. '<p>' . e($description) . '</p>'
|
||||
. $action
|
||||
. '</div></div>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Ersetzt externe iframes in redaktionellen Inhalten durch einen
|
||||
* Zwei-Klick-Platzhalter. YouTube-Einbettungen werden dabei auf
|
||||
* youtube-nocookie.com umgestellt.
|
||||
*/
|
||||
function privacy_filter_embeds(string $html): string
|
||||
{
|
||||
if ($html === '' || stripos($html, '<iframe') === false) {
|
||||
return $html;
|
||||
}
|
||||
|
||||
$result = preg_replace_callback(
|
||||
'#<iframe\b((?:[^>"\']|"[^"]*"|\'[^\']*\')*)>(.*?)</iframe>#is',
|
||||
static function (array $matches): string {
|
||||
$attributes = $matches[1];
|
||||
|
||||
if (!preg_match('#\bsrc\s*=\s*(["\'])(.*?)\1#i', $attributes, $srcMatch)) {
|
||||
return $matches[0];
|
||||
}
|
||||
|
||||
$src = html_entity_decode($srcMatch[2], ENT_QUOTES, 'UTF-8');
|
||||
|
||||
if (!preg_match('#^(?:https?:)?//#i', $src)) {
|
||||
return $matches[0];
|
||||
}
|
||||
|
||||
if (str_starts_with($src, '//')) {
|
||||
$src = 'https:' . $src;
|
||||
}
|
||||
|
||||
$title = 'Externer Inhalt';
|
||||
$description = 'Dieser Inhalt wird erst nach deinem Klick vom externen Anbieter geladen.';
|
||||
$kind = 'external';
|
||||
|
||||
if (preg_match('#\btitle\s*=\s*(["\'])(.*?)\1#i', $attributes, $titleMatch)) {
|
||||
$title = html_entity_decode($titleMatch[2], ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
if (trim($title) === '') {
|
||||
$title = 'Externer Inhalt';
|
||||
}
|
||||
|
||||
if (preg_match('#(?:youtube\.com|youtu\.be|youtube-nocookie\.com)#i', $src)) {
|
||||
$kind = 'video';
|
||||
$title = $title !== 'Externer Inhalt' ? $title : 'YouTube-Video';
|
||||
$description = 'Das Video wird erst nach deinem Klick von YouTube geladen.';
|
||||
$src = preg_replace('#//(?:www\.)?youtube\.com/#i', '//www.youtube-nocookie.com/', $src) ?? $src;
|
||||
$src = preg_replace('#//youtu\.be/#i', '//www.youtube-nocookie.com/embed/', $src) ?? $src;
|
||||
} elseif (preg_match('#google\.[a-z.]+/maps#i', $src)) {
|
||||
$kind = 'map';
|
||||
$title = $title !== 'Externer Inhalt' ? $title : 'Google Maps';
|
||||
$description = 'Die Karte wird erst nach deinem Klick von Google geladen.';
|
||||
}
|
||||
|
||||
return privacy_embed($src, $title, $description, $kind);
|
||||
},
|
||||
$html
|
||||
);
|
||||
|
||||
return $result ?? $html;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ use App\Controllers\TourChatController;
|
|||
use App\Controllers\GalleryController;
|
||||
use App\Controllers\AdminController;
|
||||
use App\Controllers\ImageController;
|
||||
use App\Controllers\PrivacyController;
|
||||
use App\Controllers\PushController;
|
||||
|
||||
$router = new Router();
|
||||
|
|
@ -87,6 +88,13 @@ $router->put('/tour/gallery/{gallery_id}/name_image/{imageName}', [GalleryContro
|
|||
$router->get('/tour/gallery/{gallery_id}/show_deleted', [GalleryController::class, 'showDeletedImages'], 'ADMIN');
|
||||
$router->post('/tour/gallery/{gallery_id}/restore_image/{imageName}', [GalleryController::class, 'restoreImage'], 'ADMIN');
|
||||
|
||||
// Datenschutz und Impressum
|
||||
$router->get('/datenschutz', [PrivacyController::class, 'show']);
|
||||
$router->post('/datenschutz/einwilligung', [PrivacyController::class, 'storeConsent']);
|
||||
$router->post('/datenschutz/externe-inhalte', [PrivacyController::class, 'updateExternalMedia']);
|
||||
$router->post('/datenschutz/widerruf', [PrivacyController::class, 'revoke']);
|
||||
$router->get('/impressum', [PrivacyController::class, 'imprint']);
|
||||
|
||||
// Authentifizierung
|
||||
$router->get('/login', [AuthController::class, 'showLoginForm']);
|
||||
$router->post('/login', [AuthController::class, 'login']);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,16 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$mapUrl = 'https://www.google.com/maps/embed?pb=!1m23!1m12!1m3!1d2497.3076616224585!2d6.775364615574858!3d51.25024443729384!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!4m8!3e0!4m0!4m5!1s0x47b8c9ec0c3c7c69%3A0x3b6fe66a97b6420a!2sTannenbaum%2C%20Tannenstra%C3%9Fe%203%2C%2040476%20D%C3%BCsseldorf!3m2!1d51.2502411!2d6.7775533!5e0!3m2!1sde!2sde!4v1580209563219!5m2!1sde!2sde';
|
||||
?>
|
||||
|
||||
<div class="mt-5">
|
||||
<iframe src="https://www.google.com/maps/embed?pb=!1m23!1m12!1m3!1d2497.3076616224585!2d6.775364615574858!3d51.25024443729384!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!4m8!3e0!4m0!4m5!1s0x47b8c9ec0c3c7c69%3A0x3b6fe66a97b6420a!2sTannenbaum%2C%20Tannenstra%C3%9Fe%203%2C%2040476%20D%C3%BCsseldorf!3m2!1d51.2502411!2d6.7775533!5e0!3m2!1sde!2sde!4v1580209563219!5m2!1sde!2sde" width="600" height="450" frameborder="0" style="border:0;" allowfullscreen=""></iframe>
|
||||
<?= privacy_embed(
|
||||
$mapUrl,
|
||||
'Google Maps – Treffpunkt',
|
||||
'Die Karte wird erst nach deinem Klick von Google geladen. Dabei werden Daten an Google übertragen.',
|
||||
'map'
|
||||
) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -87,6 +87,11 @@
|
|||
|
||||
<div class="form-group row mb-0">
|
||||
<div class="col-md-6 offset-md-4">
|
||||
<p class="small text-muted">
|
||||
Mit der Registrierung stimmst du der Verarbeitung deiner Daten zur
|
||||
Nutzung des Mitgliederportals zu. Weitere Informationen findest du in
|
||||
den <a href="/datenschutz" target="_blank" rel="noopener">Datenschutzhinweisen</a>.
|
||||
</p>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Registrieren
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -261,6 +261,12 @@
|
|||
Danach erscheint sie mit eigenem Symbol auf dem Startbildschirm und öffnet sich
|
||||
ohne Adressleiste.
|
||||
</p>
|
||||
<p>
|
||||
Beim ersten Start erscheint eine Datenschutzabfrage. Bitte bestätige die
|
||||
Datenschutzhinweise, damit das Portal genutzt werden kann. Externe Inhalte wie
|
||||
Google Maps oder YouTube werden nur nach einer zusätzlichen Einwilligung und
|
||||
erst nach einem Klick geladen.
|
||||
</p>
|
||||
|
||||
<h3 class="h5 mt-4">Android (Chrome)</h3>
|
||||
<ol class="mb-4">
|
||||
|
|
|
|||
88
motorradig/views/imprint.php
Normal file
88
motorradig/views/imprint.php
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
<?php
|
||||
$name = (string) config('privacy.controller_name');
|
||||
$address = (string) config('privacy.controller_address');
|
||||
$email = (string) config('privacy.controller_email');
|
||||
$phone = (string) config('privacy.controller_phone');
|
||||
$representedBy = trim((string) config('privacy.represented_by'));
|
||||
$registerCourt = trim((string) config('privacy.register_court'));
|
||||
$registerNumber = trim((string) config('privacy.register_number'));
|
||||
$responsibleContent = trim((string) config('privacy.responsible_content'));
|
||||
?>
|
||||
|
||||
<div class="container privacy-page mt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-10">
|
||||
<h1 class="text-center text-light">Impressum</h1>
|
||||
<p class="text-center text-light privacy-page-lead">Angaben gemäß § 5 DDG</p>
|
||||
|
||||
<div class="card text-dark mt-4">
|
||||
<div class="card-body privacy-text">
|
||||
<h2>Anbieter</h2>
|
||||
<p>
|
||||
<strong><?= e($name) ?></strong><br>
|
||||
<?= e($address) ?>
|
||||
</p>
|
||||
|
||||
<?php if ($representedBy !== ''): ?>
|
||||
<p><strong>Vertreten durch:</strong> <?= e($representedBy) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($registerCourt !== '' || $registerNumber !== ''): ?>
|
||||
<p>
|
||||
<strong>Vereinsregister:</strong>
|
||||
<?= e($registerCourt) ?><?= $registerCourt !== '' && $registerNumber !== '' ? ' – ' : '' ?><?= e($registerNumber) ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2>Kontakt</h2>
|
||||
<p>
|
||||
E-Mail: <a href="mailto:<?= e($email) ?>"><?= e($email) ?></a>
|
||||
<?php if ($phone !== ''): ?>
|
||||
<br>Telefon: <?= e($phone) ?>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
<?php if ($responsibleContent !== ''): ?>
|
||||
<h2>Verantwortlich für den Inhalt nach § 18 Abs. 2 MStV</h2>
|
||||
<p><?= e($responsibleContent) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2>Haftung für Inhalte</h2>
|
||||
<p>
|
||||
Als Diensteanbieter sind wir für eigene Inhalte auf diesen Seiten nach den
|
||||
allgemeinen Gesetzen verantwortlich. Wir sind jedoch nicht verpflichtet,
|
||||
übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach
|
||||
Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen.
|
||||
Verpflichtungen zur Entfernung oder Sperrung der Nutzung von Informationen nach
|
||||
den allgemeinen Gesetzen bleiben hiervon unberührt.
|
||||
</p>
|
||||
|
||||
<h2>Haftung für Links</h2>
|
||||
<p>
|
||||
Unser Angebot enthält Links zu externen Websites Dritter, auf deren Inhalte wir
|
||||
keinen Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine
|
||||
Gewähr übernehmen. Für die Inhalte der verlinkten Seiten ist stets der jeweilige
|
||||
Anbieter oder Betreiber der Seiten verantwortlich. Eine permanente inhaltliche
|
||||
Kontrolle der verlinkten Seiten ist ohne konkrete Anhaltspunkte einer
|
||||
Rechtsverletzung nicht zumutbar. Bei Bekanntwerden von Rechtsverletzungen werden
|
||||
wir derartige Links umgehend entfernen.
|
||||
</p>
|
||||
|
||||
<h2>Urheberrecht</h2>
|
||||
<p>
|
||||
Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten
|
||||
unterliegen dem deutschen Urheberrecht. Die Vervielfältigung, Bearbeitung,
|
||||
Verbreitung und jede Art der Verwertung außerhalb der Grenzen des Urheberrechts
|
||||
bedürfen der schriftlichen Zustimmung des jeweiligen Autors bzw. Erstellers.
|
||||
Downloads und Kopien dieser Seite sind nur für den privaten, nicht kommerziellen
|
||||
Gebrauch gestattet.
|
||||
</p>
|
||||
|
||||
<p class="mb-0">
|
||||
<a href="/datenschutz">Zur Datenschutzerklärung</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -4,6 +4,10 @@
|
|||
$active = function (string $path) use ($currentPath): string {
|
||||
return ($currentPath === $path || ($path !== '/' && str_starts_with($currentPath, $path))) ? 'active' : '';
|
||||
};
|
||||
|
||||
$privacyAccepted = \App\Core\Privacy::accepted();
|
||||
$privacyModal = \App\Core\Privacy::modalRequired();
|
||||
$privacyStatus = flash_pull('privacy_status');
|
||||
?>
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
|
|
@ -34,6 +38,7 @@
|
|||
|
||||
<!-- Scripts -->
|
||||
<script src="<?= e(asset_versioned('js/app.js')) ?>" defer></script>
|
||||
<script src="<?= e(asset_versioned('js/privacy.js')) ?>" defer></script>
|
||||
|
||||
<!-- Styles -->
|
||||
<link href="<?= e(asset_versioned('css/app.css')) ?>" rel="stylesheet">
|
||||
|
|
@ -44,7 +49,7 @@
|
|||
<link href="<?= e(asset('fonts/vendor/google/nunito.css')) ?>" rel="stylesheet">
|
||||
|
||||
</head>
|
||||
<body class="bg" style="padding: 45px 0 0 0;">
|
||||
<body class="bg<?= $privacyModal ? ' privacy-modal-open' : '' ?>" style="padding: 45px 0 0 0;">
|
||||
<div id="app">
|
||||
|
||||
<nav class="navbar navbar-expand-lg fixed-top navbar-dark bg-dark">
|
||||
|
|
@ -78,10 +83,12 @@
|
|||
|
||||
<!-- Rechte Seite der Navigation -->
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item">
|
||||
<button type="button" class="nav-link" id="pwa-install-button" hidden
|
||||
style="background:none;border:0;cursor:pointer;font:inherit;">App installieren</button>
|
||||
</li>
|
||||
<?php if ($privacyAccepted): ?>
|
||||
<li class="nav-item">
|
||||
<button type="button" class="nav-link" id="pwa-install-button" hidden
|
||||
style="background:none;border:0;cursor:pointer;font:inherit;">App installieren</button>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if (!$user): ?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/login">Login</a>
|
||||
|
|
@ -119,6 +126,8 @@
|
|||
|
||||
<a class="dropdown-item" href="/settings">Profil & Einstellungen</a>
|
||||
|
||||
<a class="dropdown-item" href="/datenschutz">Datenschutz & Impressum</a>
|
||||
|
||||
<a class="dropdown-item" href="/anleitung">Anleitung</a>
|
||||
|
||||
<a class="dropdown-item" href="#"
|
||||
|
|
@ -138,10 +147,26 @@
|
|||
</nav>
|
||||
|
||||
<main class="py-4">
|
||||
<?php if (is_string($privacyStatus) && $privacyStatus !== ''): ?>
|
||||
<div class="container">
|
||||
<div class="alert alert-success" role="alert"><?= e($privacyStatus) ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?= $content ?? '' ?>
|
||||
</main>
|
||||
|
||||
<footer class="privacy-footer">
|
||||
<a href="/datenschutz">Datenschutz</a>
|
||||
<span class="privacy-footer-sep" aria-hidden="true">·</span>
|
||||
<a href="/impressum">Impressum</a>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<?php if ($privacyModal): ?>
|
||||
<?php require __DIR__ . '/partials/privacy_consent_modal.php'; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
if ('serviceWorker' in navigator) {
|
||||
|
|
@ -158,41 +183,47 @@
|
|||
var installButton = document.getElementById('pwa-install-button');
|
||||
var deferredPrompt = null;
|
||||
|
||||
if (!installButton) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Auch ohne sichtbaren Button verhindern, dass der Browser vor der
|
||||
// Datenschutz-Zustimmung eine eigene Installationsleiste einblendet.
|
||||
window.addEventListener('beforeinstallprompt', function (event) {
|
||||
event.preventDefault();
|
||||
deferredPrompt = event;
|
||||
installButton.hidden = false;
|
||||
|
||||
if (installButton) {
|
||||
installButton.hidden = false;
|
||||
}
|
||||
});
|
||||
|
||||
installButton.addEventListener('click', function () {
|
||||
if (!deferredPrompt) {
|
||||
return;
|
||||
}
|
||||
if (installButton) {
|
||||
installButton.addEventListener('click', function () {
|
||||
if (!deferredPrompt) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
deferredPrompt.prompt();
|
||||
} catch (error) {
|
||||
deferredPrompt = null;
|
||||
installButton.hidden = true;
|
||||
return;
|
||||
}
|
||||
try {
|
||||
deferredPrompt.prompt();
|
||||
} catch (error) {
|
||||
deferredPrompt = null;
|
||||
installButton.hidden = true;
|
||||
return;
|
||||
}
|
||||
|
||||
deferredPrompt.userChoice.then(function () {
|
||||
deferredPrompt = null;
|
||||
installButton.hidden = true;
|
||||
}).catch(function () {
|
||||
deferredPrompt = null;
|
||||
installButton.hidden = true;
|
||||
deferredPrompt.userChoice.then(function () {
|
||||
deferredPrompt = null;
|
||||
installButton.hidden = true;
|
||||
}).catch(function () {
|
||||
deferredPrompt = null;
|
||||
installButton.hidden = true;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
window.addEventListener('appinstalled', function () {
|
||||
deferredPrompt = null;
|
||||
installButton.hidden = true;
|
||||
|
||||
if (installButton) {
|
||||
installButton.hidden = true;
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -183,6 +183,12 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<p class="small text-muted mt-3">
|
||||
Mit dem Absenden des Antrags bestätigst du, dass die angegebenen Daten zur
|
||||
Bearbeitung deiner Mitgliedschaft verarbeitet werden. Weitere Informationen
|
||||
findest du in den <a href="/datenschutz" target="_blank" rel="noopener">Datenschutzhinweisen</a>.
|
||||
</p>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Absenden</button>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
48
motorradig/views/partials/privacy_consent_form.php
Normal file
48
motorradig/views/partials/privacy_consent_form.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
$privacyContext = $privacyContext ?? 'page';
|
||||
$privacyReturnTo = $privacyReturnTo ?? '/';
|
||||
$privacyError = $privacyError ?? null;
|
||||
$privacyExternal = $privacyExternal ?? false;
|
||||
|
||||
$noticeId = 'privacy-notice-' . $privacyContext;
|
||||
$externalId = 'privacy-external-' . $privacyContext;
|
||||
$target = $privacyContext === 'modal' ? ' target="_blank" rel="noopener"' : '';
|
||||
?>
|
||||
<?php if ($privacyContext === 'modal' && is_string($privacyError) && $privacyError !== ''): ?>
|
||||
<div class="alert alert-danger" role="alert"><?= e($privacyError) ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="post" action="/datenschutz/einwilligung" class="privacy-consent-form">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="return_to" value="<?= e($privacyReturnTo) ?>">
|
||||
|
||||
<div class="form-check privacy-consent-check">
|
||||
<input class="form-check-input" type="checkbox" name="privacy_notice" value="1" id="<?= e($noticeId) ?>" required>
|
||||
<label class="form-check-label" for="<?= e($noticeId) ?>">
|
||||
Ich habe die <a href="/datenschutz"<?= $target ?>>Datenschutzhinweise</a> gelesen und
|
||||
stimme der Verarbeitung meiner Daten zur Nutzung des Mitgliederportals zu.
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check privacy-consent-check">
|
||||
<input class="form-check-input" type="checkbox" name="external_media" value="1" id="<?= e($externalId) ?>" <?= $privacyExternal ? 'checked' : '' ?>>
|
||||
<label class="form-check-label" for="<?= e($externalId) ?>">
|
||||
Externe Inhalte (Google Maps, YouTube) laden.
|
||||
<span class="text-muted">Freiwillig und jederzeit widerrufbar.</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<p class="privacy-consent-hint">
|
||||
Fotos werden nur übertragen, wenn du beim Hochladen selbst Bilder auswählst.
|
||||
Standortdaten verwendet die App derzeit nicht.
|
||||
</p>
|
||||
|
||||
<div class="privacy-consent-actions">
|
||||
<button type="submit" name="consent_mode" value="essential" class="btn btn-outline-secondary">
|
||||
Nur notwendige Inhalte
|
||||
</button>
|
||||
<button type="submit" name="consent_mode" value="all" class="btn btn-primary">
|
||||
<?= $privacyContext === 'modal' ? 'Zustimmen und fortfahren' : 'Einwilligung speichern' ?>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
31
motorradig/views/partials/privacy_consent_modal.php
Normal file
31
motorradig/views/partials/privacy_consent_modal.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
$privacyContext = 'modal';
|
||||
$privacyReturnTo = current_path();
|
||||
$privacyError = flash_pull('privacy_error');
|
||||
$privacyExternal = false;
|
||||
?>
|
||||
<div class="privacy-consent-modal" id="privacy-consent-modal" role="dialog" aria-modal="true"
|
||||
aria-labelledby="privacy-consent-title">
|
||||
<div class="privacy-consent-dialog">
|
||||
<p class="privacy-consent-kicker">Datenschutz</p>
|
||||
<h2 id="privacy-consent-title">Bevor du das Portal nutzt</h2>
|
||||
|
||||
<p>
|
||||
Wir verarbeiten personenbezogene Daten, um das Mitgliederportal und seine Funktionen
|
||||
bereitzustellen. Bitte lies die Datenschutzhinweise und bestätige sie.
|
||||
</p>
|
||||
|
||||
<ul class="privacy-consent-list">
|
||||
<li><strong>Fotos:</strong> Du wählst beim Hochladen selbst aus, welche Bilder übertragen werden.</li>
|
||||
<li><strong>Standort:</strong> Die App verwendet derzeit keine Standort- oder GPS-Daten.</li>
|
||||
<li><strong>Externe Inhalte:</strong> Google Maps und YouTube werden nur nach deiner Einwilligung und erst nach einem Klick geladen.</li>
|
||||
</ul>
|
||||
|
||||
<?php require __DIR__ . '/privacy_consent_form.php'; ?>
|
||||
|
||||
<p class="privacy-consent-small">
|
||||
Die Einwilligung in externe Inhalte ist freiwillig. Du kannst sie jederzeit unter
|
||||
<a href="/datenschutz" target="_blank" rel="noopener">Datenschutz</a> widerrufen.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
293
motorradig/views/privacy.php
Normal file
293
motorradig/views/privacy.php
Normal file
|
|
@ -0,0 +1,293 @@
|
|||
<?php
|
||||
$state = is_array($state ?? null) ? $state : \App\Core\Privacy::state();
|
||||
$accepted = \App\Core\Privacy::accepted();
|
||||
$externalMedia = \App\Core\Privacy::externalMediaAllowed();
|
||||
|
||||
$controllerName = (string) config('privacy.controller_name');
|
||||
$controllerAddress = (string) config('privacy.controller_address');
|
||||
$controllerEmail = (string) config('privacy.controller_email');
|
||||
$controllerPhone = (string) config('privacy.controller_phone');
|
||||
$hostingProvider = trim((string) config('privacy.hosting_provider'));
|
||||
$versionTimestamp = strtotime((string) config('privacy.version'));
|
||||
$privacyVersionDate = $versionTimestamp !== false ? date('d.m.Y', $versionTimestamp) : '';
|
||||
|
||||
$acceptedAt = null;
|
||||
if (!empty($state['accepted_at'])) {
|
||||
$timestamp = strtotime((string) $state['accepted_at']);
|
||||
if ($timestamp !== false) {
|
||||
$acceptedAt = date('d.m.Y H:i', $timestamp);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container privacy-page mt-5">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-10">
|
||||
<h1 class="text-center text-light">Datenschutz</h1>
|
||||
<p class="text-center text-light privacy-page-lead">
|
||||
Informationen zur Verarbeitung personenbezogener Daten im Mitgliederportal der
|
||||
<?= e($controllerName) ?>.
|
||||
</p>
|
||||
|
||||
<div class="card text-dark mt-4" id="einwilligung">
|
||||
<div class="card-body">
|
||||
<div id="externe-inhalte"></div>
|
||||
|
||||
<?php if (is_string($privacyError ?? null) && $privacyError !== ''): ?>
|
||||
<div class="alert alert-danger" role="alert"><?= e($privacyError) ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<h2 class="h4 mb-3">Deine Einwilligung</h2>
|
||||
|
||||
<?php if ($accepted): ?>
|
||||
<p class="mb-2">
|
||||
<strong>Status:</strong> bestätigt<?= $acceptedAt !== null ? ' am ' . e($acceptedAt) : '' ?>.
|
||||
</p>
|
||||
<p class="mb-3">
|
||||
<strong>Externe Inhalte:</strong>
|
||||
<?= $externalMedia ? 'erlaubt' : 'deaktiviert' ?>.
|
||||
Google Maps und YouTube werden in jedem Fall erst nach einem Klick geladen.
|
||||
</p>
|
||||
|
||||
<form method="post" action="/datenschutz/externe-inhalte" class="mb-3">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="return_to" value="/datenschutz#externe-inhalte">
|
||||
<div class="form-check mb-3">
|
||||
<input class="form-check-input" type="checkbox" name="external_media" value="1"
|
||||
id="external-media-setting" <?= $externalMedia ? 'checked' : '' ?>>
|
||||
<label class="form-check-label" for="external-media-setting">
|
||||
Externe Inhalte (Google Maps, YouTube) erlauben.
|
||||
<span class="text-muted">Freiwillig und jederzeit widerrufbar.</span>
|
||||
</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary btn-sm">Einstellung speichern</button>
|
||||
</form>
|
||||
|
||||
<form method="post" action="/datenschutz/widerruf"
|
||||
onsubmit="return confirm('Möchtest du deine Datenschutz-Einwilligung wirklich widerrufen? Ohne erneute Zustimmung kannst du das Mitgliederportal nicht nutzen.');">
|
||||
<?= csrf_field() ?>
|
||||
<button type="submit" class="btn btn-outline-danger btn-sm">Einwilligung widerrufen</button>
|
||||
</form>
|
||||
<p class="small text-muted mt-2 mb-0">
|
||||
Der Widerruf betrifft die Einwilligung in die Nutzung des Portals. Die Verarbeitung
|
||||
deiner Mitgliedsdaten auf Grundlage des Mitgliedsvertrags bleibt hiervon unberührt.
|
||||
</p>
|
||||
<?php else: ?>
|
||||
<p class="mb-3">
|
||||
<?php if (!empty($state['accepted'])): ?>
|
||||
Die Datenschutzhinweise wurden geändert. Bitte bestätige die aktuelle Fassung erneut.
|
||||
<?php else: ?>
|
||||
Du hast die Datenschutzhinweise noch nicht bestätigt. Bitte lies sie und stimme
|
||||
anschließend zu, damit du das Mitgliederportal nutzen kannst.
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$privacyContext = 'page';
|
||||
$privacyReturnTo = '/datenschutz';
|
||||
$privacyExternal = false;
|
||||
require __DIR__ . '/partials/privacy_consent_form.php';
|
||||
?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card text-dark mt-4">
|
||||
<div class="card-body privacy-text">
|
||||
<h2>1. Verantwortlicher</h2>
|
||||
<p>
|
||||
Verantwortlich für die Datenverarbeitung ist:<br>
|
||||
<strong><?= e($controllerName) ?></strong><br>
|
||||
<?= e($controllerAddress) ?><br>
|
||||
E-Mail: <a href="mailto:<?= e($controllerEmail) ?>"><?= e($controllerEmail) ?></a>
|
||||
<?php if ($controllerPhone !== ''): ?>
|
||||
<br>Telefon: <?= e($controllerPhone) ?>
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
<h2>2. Hosting und Server-Logfiles</h2>
|
||||
<p>
|
||||
Beim Aufruf der Website werden durch den Webserver automatisch technische Daten
|
||||
verarbeitet, insbesondere IP-Adresse, Datum und Uhrzeit des Zugriffs, aufgerufene
|
||||
Seite, übertragene Datenmenge, Browsertyp und Betriebssystem sowie gegebenenfalls
|
||||
die zuvor besuchte Seite. Diese Daten sind für die sichere und stabile Bereitstellung
|
||||
der Website erforderlich. Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO
|
||||
(berechtigtes Interesse an Sicherheit und Funktionsfähigkeit).
|
||||
</p>
|
||||
<p>
|
||||
Die Logfiles werden nur so lange gespeichert, wie es für die Fehleranalyse und die
|
||||
Abwehr von Angriffen erforderlich ist. Eine Löschung erfolgt, sobald der Zweck
|
||||
entfällt, sofern keine gesetzlichen Aufbewahrungspflichten entgegenstehen.
|
||||
<?php if ($hostingProvider !== ''): ?>
|
||||
Der Hosting-Anbieter <?= e($hostingProvider) ?> verarbeitet die Daten in unserem
|
||||
Auftrag auf Grundlage eines Vertrags zur Auftragsverarbeitung.
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
|
||||
<h2>3. Mitgliedskonto und Profil</h2>
|
||||
<p>
|
||||
Für die Nutzung des Mitgliederbereichs verarbeiten wir deinen Namen, deine
|
||||
E-Mail-Adresse, deine Telefonnummer, dein Passwort in gehashter Form, deine Rolle
|
||||
im Verein sowie ein von dir hochgeladenes Profilbild. Diese Daten werden benötigt,
|
||||
um dein Konto bereitzustellen, dich anzumelden und die Vereinskommunikation zu
|
||||
ermöglichen. Rechtsgrundlage ist Art. 6 Abs. 1 lit. b DSGVO
|
||||
(Erfüllung des Mitgliedsvertrags bzw. Nutzungsverhältnisses).
|
||||
</p>
|
||||
<p>
|
||||
Die Mitgliederliste ist nur für angemeldete Nutzer sichtbar. Bitte beachte, dass
|
||||
dein Name und deine Kontaktdaten dort für andere angemeldete Nutzer einsehbar
|
||||
sein können.
|
||||
</p>
|
||||
|
||||
<h2>4. Touren, Buchungen und Tour-Chat</h2>
|
||||
<p>
|
||||
Wenn du Touren buchst, Zimmer auswählst oder den Tour-Chat nutzt, verarbeiten wir
|
||||
die dazu erforderlichen Daten, insbesondere deine Teilnahme, Zimmerzuordnung und
|
||||
deine Chatnachrichten. Die Daten sind für die Durchführung der Tour und die
|
||||
Organisation unter den Teilnehmenden erforderlich (Art. 6 Abs. 1 lit. b DSGVO).
|
||||
</p>
|
||||
|
||||
<h2>5. Bilder und Galerien</h2>
|
||||
<p>
|
||||
Profilbilder, Tourbilder und Galeriebilder werden nur gespeichert, wenn du sie
|
||||
selbst auswählst und hochlädst. Beim Upload wählst du einzelne Dateien aus; einen
|
||||
pauschalen Zugriff auf deine gesamte Fotobibliothek gibt es nicht. Bitte lade nur
|
||||
Bilder hoch, an denen du die erforderlichen Rechte hast und mit deren
|
||||
Veröffentlichung die abgebildeten Personen einverstanden sind. Die Bilder werden
|
||||
außerhalb des öffentlichen Web-Verzeichnisses gespeichert und nur berechtigten
|
||||
Personen angezeigt.
|
||||
</p>
|
||||
|
||||
<h2>6. Mitgliedsantrag und SEPA-Lastschrift</h2>
|
||||
<p>
|
||||
Über das Online-Formular kannst du einen Mitgliedsantrag stellen. Dabei verarbeiten
|
||||
wir die von dir angegebenen Daten, insbesondere Name, Anschrift, Geburtsdatum,
|
||||
Telefonnummer, E-Mail-Adresse, Motorrad, Bankverbindung und die digitale
|
||||
Unterschrift. Die Verarbeitung dient der Prüfung und Abwicklung deiner
|
||||
Mitgliedschaft sowie der Durchführung des Lastschriftverfahrens. Rechtsgrundlage
|
||||
ist Art. 6 Abs. 1 lit. b DSGVO; für gesetzliche Aufbewahrungspflichten
|
||||
Art. 6 Abs. 1 lit. c DSGVO.
|
||||
</p>
|
||||
|
||||
<h2>7. E-Mail-Versand</h2>
|
||||
<p>
|
||||
Für Bestätigungen, Passwort-Zurücksetzungen und Benachrichtigungen versenden wir
|
||||
E-Mails an die von dir angegebene Adresse. Die dafür erforderlichen Daten werden
|
||||
bei unserem E-Mail-System verarbeitet. Rechtsgrundlage ist die Vertragserfüllung
|
||||
bzw. unser berechtigtes Interesse an einer zuverlässigen Kommunikation
|
||||
(Art. 6 Abs. 1 lit. b und lit. f DSGVO).
|
||||
</p>
|
||||
|
||||
<h2>8. Push-Benachrichtigungen</h2>
|
||||
<p>
|
||||
Auf dem Smartphone kannst du Push-Benachrichtigungen für neue Touren, Absagen und
|
||||
den Tour-Chat aktivieren. Dabei werden ein Geräte-Endpunkt und technische
|
||||
Schlüssel gespeichert. Push-Nachrichten werden nur versendet, wenn du sie
|
||||
ausdrücklich aktiviert hast. Rechtsgrundlage ist deine Einwilligung nach
|
||||
Art. 6 Abs. 1 lit. a DSGVO. Du kannst die Benachrichtigungen jederzeit in den
|
||||
Profileinstellungen oder in den Systemeinstellungen deines Geräts deaktivieren.
|
||||
</p>
|
||||
|
||||
<h2>9. Cookies und lokale Speicherung</h2>
|
||||
<p>
|
||||
Wir verwenden technisch notwendige Cookies. Dazu gehören das Session-Cookie
|
||||
<code>PHPSESSID</code> für die Anmeldung und das Cookie
|
||||
<code>mig_privacy_consent</code>, mit dem wir deine Datenschutz-Entscheidung
|
||||
für ein Jahr speichern. Beide Cookies sind für den Betrieb und die Beachtung deiner
|
||||
Einwilligung erforderlich. Es werden keine Marketing-, Analyse- oder
|
||||
Tracking-Cookies eingesetzt.
|
||||
</p>
|
||||
<p>
|
||||
Zur Dokumentation der Einwilligung werden Zeitpunkt, Fassung der Hinweise und
|
||||
technische Angaben (z. B. IP-Adresse und Browser) in den Server-Logs gespeichert.
|
||||
Rechtsgrundlage ist Art. 6 Abs. 1 lit. f DSGVO (Nachweis der Einwilligung).
|
||||
</p>
|
||||
|
||||
<h2>10. Externe Inhalte: Google Maps und YouTube</h2>
|
||||
<p>
|
||||
Auf der Seite „Aktivitäten“ kann eine Google-Maps-Karte angezeigt werden. Künftig
|
||||
können auch YouTube-Videos eingebunden werden. Beide Inhalte werden standardmäßig
|
||||
<strong>nicht</strong> geladen. Sie werden erst nach deiner Einwilligung in externe
|
||||
Inhalte und nach einem ausdrücklichen Klick geladen. YouTube wird dabei über
|
||||
<code>youtube-nocookie.com</code> eingebunden.
|
||||
</p>
|
||||
<p>
|
||||
Beim Laden können Daten an Google Ireland Limited, Gordon House, Barrow Street,
|
||||
Dublin 4, Irland, übertragen werden, insbesondere IP-Adresse, Browserdaten und
|
||||
Informationen über die aufgerufene Seite. Eine Übertragung in die USA ist möglich;
|
||||
Google stützt sich dabei auf geeignete Garantien. Rechtsgrundlage ist deine
|
||||
Einwilligung nach Art. 6 Abs. 1 lit. a DSGVO. Weitere Informationen findest du in
|
||||
der Datenschutzerklärung von Google:
|
||||
<a href="https://policies.google.com/privacy" target="_blank" rel="noopener">https://policies.google.com/privacy</a>.
|
||||
</p>
|
||||
|
||||
<h2>11. Empfänger und Auftragsverarbeitung</h2>
|
||||
<p>
|
||||
Daten werden nur an die Stellen weitergegeben, die sie für die genannten Zwecke
|
||||
benötigen. Dazu können der Hosting-Anbieter, der E-Mail-Dienst, der Push-Dienst
|
||||
des jeweiligen Browsers sowie im Fall von Google Maps und YouTube die Google
|
||||
Ireland Limited gehören. Mit Dienstleistern werden, soweit erforderlich,
|
||||
Verträge zur Auftragsverarbeitung geschlossen.
|
||||
</p>
|
||||
|
||||
<h2>12. Speicherdauer</h2>
|
||||
<p>
|
||||
Wir speichern personenbezogene Daten nur so lange, wie es für den jeweiligen Zweck
|
||||
erforderlich ist oder gesetzliche Aufbewahrungspflichten bestehen. Kontodaten
|
||||
werden während der Mitgliedschaft gespeichert und nach Beendigung gelöscht,
|
||||
soweit keine gesetzlichen Pflichten entgegenstehen. Nicht angenommene
|
||||
Mitgliedsanträge werden gelöscht, sobald sie für die Bearbeitung nicht mehr
|
||||
benötigt werden. Steuer- und handelsrechtlich relevante Unterlagen können bis zu
|
||||
zehn Jahre aufbewahrt werden.
|
||||
</p>
|
||||
|
||||
<h2>13. Deine Rechte</h2>
|
||||
<p>Du hast nach der DSGVO insbesondere folgende Rechte:</p>
|
||||
<ul>
|
||||
<li>Auskunft über die verarbeiteten Daten (Art. 15 DSGVO),</li>
|
||||
<li>Berichtigung unrichtiger Daten (Art. 16 DSGVO),</li>
|
||||
<li>Löschung (Art. 17 DSGVO),</li>
|
||||
<li>Einschränkung der Verarbeitung (Art. 18 DSGVO),</li>
|
||||
<li>Datenübertragbarkeit (Art. 20 DSGVO),</li>
|
||||
<li>Widerspruch gegen die Verarbeitung (Art. 21 DSGVO),</li>
|
||||
<li>Widerruf einer erteilten Einwilligung (Art. 7 Abs. 3 DSGVO).</li>
|
||||
</ul>
|
||||
<p>
|
||||
Für Anfragen genügt eine E-Mail an
|
||||
<a href="mailto:<?= e($controllerEmail) ?>"><?= e($controllerEmail) ?></a>.
|
||||
</p>
|
||||
|
||||
<h2>14. Beschwerderecht</h2>
|
||||
<p>
|
||||
Du hast das Recht, dich bei einer Datenschutz-Aufsichtsbehörde zu beschweren.
|
||||
Zuständig ist die Landesbeauftragte für Datenschutz und Informationsfreiheit
|
||||
Nordrhein-Westfalen, Kavalleriestraße 2–4, 40213 Düsseldorf.
|
||||
</p>
|
||||
|
||||
<h2>15. Datensicherheit</h2>
|
||||
<p>
|
||||
Die Website wird über eine verschlüsselte HTTPS-Verbindung ausgeliefert.
|
||||
Passwörter werden nicht im Klartext gespeichert. Geschützte Bilder und PDFs
|
||||
liegen außerhalb des öffentlichen Web-Verzeichnisses und werden nur nach
|
||||
Berechtigungsprüfung ausgeliefert.
|
||||
</p>
|
||||
|
||||
<h2>16. Änderungen dieser Hinweise</h2>
|
||||
<p>
|
||||
Wir passen diese Datenschutzhinweise an, wenn sich die Datenverarbeitung oder die
|
||||
rechtlichen Rahmenbedingungen ändern. Bei wesentlichen Änderungen bitten wir um
|
||||
eine erneute Bestätigung. Es gilt die jeweils auf dieser Seite veröffentlichte
|
||||
Fassung.
|
||||
</p>
|
||||
<?php if ($privacyVersionDate !== ''): ?>
|
||||
<p class="small text-muted">Stand: <?= e($privacyVersionDate) ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="mb-0">
|
||||
<a href="/impressum">Zum Impressum</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -66,6 +66,8 @@
|
|||
accept="image/jpeg,image/png,image/gif,image/webp" value="">
|
||||
<small class="form-text text-muted ml-3 mt-2">
|
||||
Optional. Weitere Bilder können nach dem Anlegen in der Tour hinzugefügt werden.
|
||||
Bitte nur Bilder verwenden, an denen du die erforderlichen Rechte hast und
|
||||
abgebildete Personen mit der Veröffentlichung einverstanden sind.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -198,6 +198,11 @@
|
|||
<button type="submit" class="btn btn-primary gallery-btn">Bilder hochladen</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p class="tour-media-hint mt-3">
|
||||
Bitte lade nur Bilder hoch, an denen du die erforderlichen Rechte hast und
|
||||
abgebildete Personen mit der Veröffentlichung einverstanden sind.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<!-- Modal: Zimmer auswählen -->
|
||||
|
|
|
|||
|
|
@ -107,6 +107,10 @@
|
|||
JPG, PNG, GIF oder WebP · bis zu <?= e($uploadLimit) ?> pro Bild.<br>
|
||||
HEIC/HEIF (iPhone) bitte vorher als JPG exportieren.
|
||||
</p>
|
||||
<p class="small">
|
||||
Bitte lade nur Bilder hoch, an denen du die erforderlichen Rechte hast und abgebildete
|
||||
Personen mit der Veröffentlichung einverstanden sind.
|
||||
</p>
|
||||
|
||||
<form method="post" action="/tour/gallery/<?= e($tour_id) ?>" enctype="multipart/form-data">
|
||||
<?= csrf_field() ?>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,17 @@
|
|||
$pushPublicKey = $pushPublicKey ?? null;
|
||||
$pushEnabled = $pushEnabled ?? false;
|
||||
$isOwnProfile = $current !== null && (int) $current->id === (int) $user->id;
|
||||
|
||||
$privacyState = \App\Core\Privacy::state();
|
||||
$privacyAccepted = \App\Core\Privacy::accepted();
|
||||
$privacyAcceptedAt = null;
|
||||
|
||||
if (!empty($privacyState['accepted_at'])) {
|
||||
$privacyTimestamp = strtotime((string) $privacyState['accepted_at']);
|
||||
if ($privacyTimestamp !== false) {
|
||||
$privacyAcceptedAt = date('d.m.Y H:i', $privacyTimestamp);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="container text-center text-light mt-5">
|
||||
|
|
@ -55,6 +66,11 @@
|
|||
accept="image/*" onchange="preview_image(event)">
|
||||
</div>
|
||||
|
||||
<p class="small text-muted text-left ml-2 mb-3">
|
||||
Mit dem Hochladen bestätigst du, dass du die erforderlichen Rechte am Bild hast und
|
||||
abgebildete Personen mit der Veröffentlichung einverstanden sind.
|
||||
</p>
|
||||
|
||||
<?php if ($current && $current->isAdmin()): ?>
|
||||
<div class="form-group" style="display:flex;">
|
||||
<label class="ml-2 mt-4" style="width:130px; text-align:left;" for="role"><h4>Rolle:</h4></label>
|
||||
|
|
@ -86,6 +102,41 @@
|
|||
<?= csrf_field() ?>
|
||||
</form>
|
||||
|
||||
<?php if ($isOwnProfile): ?>
|
||||
<div class="card text-dark mt-4 text-left" id="privacy-settings" style="clear: both;">
|
||||
<div class="card-body">
|
||||
<h2 class="h5 mb-2">Datenschutz & Einwilligungen</h2>
|
||||
<p class="mb-2">
|
||||
<strong>Status:</strong>
|
||||
<?php if ($privacyAccepted): ?>
|
||||
bestätigt<?= $privacyAcceptedAt !== null ? ' am ' . e($privacyAcceptedAt) : '' ?>
|
||||
<?php elseif (!empty($privacyState['accepted'])): ?>
|
||||
Die Datenschutzhinweise wurden geändert. Bitte erneut bestätigen.
|
||||
<?php else: ?>
|
||||
noch nicht bestätigt
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<p class="mb-3">
|
||||
<strong>Externe Inhalte:</strong>
|
||||
<?= \App\Core\Privacy::externalMediaAllowed() ? 'erlaubt' : 'deaktiviert' ?>
|
||||
<span class="text-muted">(Google Maps, YouTube)</span>
|
||||
</p>
|
||||
|
||||
<a class="btn btn-sm btn-outline-primary" href="/datenschutz#einwilligung">
|
||||
Datenschutz-Einstellungen öffnen
|
||||
</a>
|
||||
|
||||
<?php if ($privacyAccepted): ?>
|
||||
<form method="post" action="/datenschutz/widerruf" class="d-inline-block ml-2"
|
||||
onsubmit="return confirm('Möchtest du deine Datenschutz-Einwilligung wirklich widerrufen? Ohne erneute Zustimmung kannst du das Mitgliederportal nicht nutzen.');">
|
||||
<?= csrf_field() ?>
|
||||
<button type="submit" class="btn btn-sm btn-outline-danger">Einwilligung widerrufen</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($isOwnProfile && $pushPublicKey !== null && !is_desktop()): ?>
|
||||
<div class="card text-dark mt-4 text-left" id="push-settings" style="clear: both;"
|
||||
data-vapid-key="<?= e($pushPublicKey) ?>"
|
||||
|
|
|
|||
|
|
@ -99,6 +99,34 @@ MIGRATIONS = [
|
|||
KEY `push_subscriptions_user_id_index` (`user_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci''',
|
||||
|
||||
# Datenschutz-Einwilligung: Spalten in users ergänzen (idempotent)
|
||||
'''SET @has_privacy_consent_at := (SELECT COUNT(*) FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'users' AND COLUMN_NAME = 'privacy_consent_at');
|
||||
SET @sql := IF(@has_privacy_consent_at = 0,
|
||||
'ALTER TABLE `users` ADD COLUMN `privacy_consent_at` datetime NULL DEFAULT NULL',
|
||||
'DO 0');
|
||||
PREPARE mig_stmt FROM @sql;
|
||||
EXECUTE mig_stmt;
|
||||
DEALLOCATE PREPARE mig_stmt''',
|
||||
|
||||
'''SET @has_privacy_consent_version := (SELECT COUNT(*) FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'users' AND COLUMN_NAME = 'privacy_consent_version');
|
||||
SET @sql := IF(@has_privacy_consent_version = 0,
|
||||
'ALTER TABLE `users` ADD COLUMN `privacy_consent_version` varchar(32) NULL DEFAULT NULL',
|
||||
'DO 0');
|
||||
PREPARE mig_stmt FROM @sql;
|
||||
EXECUTE mig_stmt;
|
||||
DEALLOCATE PREPARE mig_stmt''',
|
||||
|
||||
'''SET @has_privacy_external_media := (SELECT COUNT(*) FROM information_schema.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'users' AND COLUMN_NAME = 'privacy_external_media');
|
||||
SET @sql := IF(@has_privacy_external_media = 0,
|
||||
'ALTER TABLE `users` ADD COLUMN `privacy_external_media` tinyint(1) NOT NULL DEFAULT 0',
|
||||
'DO 0');
|
||||
PREPARE mig_stmt FROM @sql;
|
||||
EXECUTE mig_stmt;
|
||||
DEALLOCATE PREPARE mig_stmt''',
|
||||
|
||||
# Tour-Chat: Nachrichten
|
||||
'''CREATE TABLE IF NOT EXISTS `tour_messages` (
|
||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue