py app init + zitadel doku
This commit is contained in:
1 parent
5b649f96f2
commit
5a0260e4fd
23 files changed
+1071
-1
No files matched your search
@@ -0,0 +1,56 @@
|
||||
{#
|
||||
Datei: templates/index.html
|
||||
Autor: <Vorname Nachname>
|
||||
Datum: 2026-06-17
|
||||
Zweck: Dashboard mit Test-Matrix. Zeigt Kacheln je nach Rolle des eingeloggten Nutzers.
|
||||
Variablen: user (dict), projects (list[Project]), forbidden_project (Project|None)
|
||||
#}
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Dashboard{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Dashboard</h1>
|
||||
<p class="subtitle">Angemeldet als <strong>{{ user.email }}</strong> · Rolle: <em>{{ user.role }}</em></p>
|
||||
|
||||
<div class="card-grid">
|
||||
|
||||
{% if user.role == "Admin" %}
|
||||
<div class="card">
|
||||
<h2>Admin Cockpit</h2>
|
||||
<p>Vollzugriff auf alle Clients, Projekte und Nutzer.</p>
|
||||
<a href="{{ url_for('main.admin') }}" class="btn">Öffnen</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if user.role == "Mitarbeiter" %}
|
||||
<div class="card">
|
||||
<h2>Mitarbeiter Cockpit</h2>
|
||||
<p>Deine zugewiesenen Projekte im Überblick.</p>
|
||||
<a href="{{ url_for('main.mitarbeiter') }}" class="btn">Meine Projekte</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if projects %}
|
||||
<div class="card">
|
||||
<h2>Kundenprojekte</h2>
|
||||
<ul class="project-list">
|
||||
{% for p in projects %}
|
||||
<li><a href="{{ url_for('main.projekt', project_id=p.id) }}">{{ p.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if forbidden_project %}
|
||||
<div class="card card--warning">
|
||||
<h2>⚠ Test: Unbefugter Zugriff</h2>
|
||||
<p>Simuliert einen Angriff: Zugriff auf ein nicht zugewiesenes Projekt.</p>
|
||||
<a href="{{ url_for('main.projekt', project_id=forbidden_project.id) }}" class="btn btn--danger">
|
||||
Zugriff auf „{{ forbidden_project.name }}" erzwingen
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user