add user management
This commit is contained in:
25
templates/bundles/TwigBundle/Exception/error.html.twig
Normal file
25
templates/bundles/TwigBundle/Exception/error.html.twig
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends 'error/layout.html.twig' %}
|
||||
|
||||
{% set status_code = status_code|default(500) %}
|
||||
|
||||
{% block title %}Fehler {{ status_code }}{% endblock %}
|
||||
{% block heading %}Ein Fehler ist aufgetreten{% endblock %}
|
||||
{% block message %}Die Anfrage konnte nicht verarbeitet werden. Falls der Fehler erneut auftritt, prüfe bitte die System-Logs.{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
{% if app.user and is_granted('ROLE_CHAT_USER') %}
|
||||
<a class="btn btn-info" href="{{ path('chat_index') }}">
|
||||
<i class="bi bi-chat-dots"></i> Zum Chat
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if app.user and is_granted('ROLE_ADMIN_AREA') %}
|
||||
<a class="btn btn-outline-light" href="{{ path('admin_dashboard') }}">
|
||||
<i class="bi bi-speedometer2"></i> Zum Adminbereich
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if not app.user %}
|
||||
<a class="btn btn-info" href="{{ path('chat_login') }}">
|
||||
<i class="bi bi-box-arrow-in-right"></i> Zur Anmeldung
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,9 @@
|
||||
{% extends 'error/access_denied.html.twig' %}
|
||||
|
||||
{% set status_code = status_code|default(403) %}
|
||||
{% set area_label = area_label|default('Anwendung') %}
|
||||
{% set required_role = required_role|default('passende Berechtigung') %}
|
||||
{% set message = message|default('Für diese Seite fehlen deinem Benutzerkonto die notwendigen Rechte.') %}
|
||||
{% set current_user_identifier = current_user_identifier|default(app.user ? app.user.userIdentifier : null) %}
|
||||
{% set home_route = home_route|default(app.user and is_granted('ROLE_CHAT_USER') ? 'chat_index' : (app.user and is_granted('ROLE_ADMIN_AREA') ? 'admin_dashboard' : null)) %}
|
||||
{% set home_label = home_label|default(home_route == 'chat_index' ? 'Zum Chat' : (home_route == 'admin_dashboard' ? 'Zum Admin-Dashboard' : null)) %}
|
||||
29
templates/bundles/TwigBundle/Exception/error404.html.twig
Normal file
29
templates/bundles/TwigBundle/Exception/error404.html.twig
Normal file
@@ -0,0 +1,29 @@
|
||||
{% extends 'error/layout.html.twig' %}
|
||||
|
||||
{% set status_code = status_code|default(404) %}
|
||||
|
||||
{% block title %}Seite nicht gefunden · Fehler 404{% endblock %}
|
||||
{% block icon %}<i class="bi bi-signpost-split fs-3 text-info"></i>{% endblock %}
|
||||
{% block heading %}Seite nicht gefunden{% endblock %}
|
||||
{% block message %}Die angeforderte Seite existiert nicht oder wurde verschoben.{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
{% if app.user and is_granted('ROLE_CHAT_USER') %}
|
||||
<a class="btn btn-info" href="{{ path('chat_index') }}">
|
||||
<i class="bi bi-chat-dots"></i> Zum Chat
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if app.user and is_granted('ROLE_ADMIN_AREA') %}
|
||||
<a class="btn btn-outline-light" href="{{ path('admin_dashboard') }}">
|
||||
<i class="bi bi-speedometer2"></i> Zum Adminbereich
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if not app.user %}
|
||||
<a class="btn btn-info" href="{{ path('chat_login') }}">
|
||||
<i class="bi bi-box-arrow-in-right"></i> Zur Chat-Anmeldung
|
||||
</a>
|
||||
<a class="btn btn-outline-light" href="{{ path('admin_login') }}">
|
||||
<i class="bi bi-shield-lock"></i> Zur Admin-Anmeldung
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
27
templates/bundles/TwigBundle/Exception/error500.html.twig
Normal file
27
templates/bundles/TwigBundle/Exception/error500.html.twig
Normal file
@@ -0,0 +1,27 @@
|
||||
{% extends 'error/layout.html.twig' %}
|
||||
|
||||
{% set status_code = status_code|default(500) %}
|
||||
|
||||
{% block title %}Systemfehler · Fehler 500{% endblock %}
|
||||
{% block icon %}<i class="bi bi-bug fs-3 text-danger"></i>{% endblock %}
|
||||
{% block heading %}Systemfehler{% endblock %}
|
||||
{% block message %}Es ist ein unerwarteter Fehler aufgetreten. Bitte versuche es erneut oder prüfe die System-Logs im Adminbereich.{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
{% if app.user and is_granted('ROLE_ADMIN_AREA') %}
|
||||
<a class="btn btn-info" href="{{ path('admin_system_logs_index') }}">
|
||||
<i class="bi bi-terminal"></i> System-Logs öffnen
|
||||
</a>
|
||||
<a class="btn btn-outline-light" href="{{ path('admin_dashboard') }}">
|
||||
<i class="bi bi-speedometer2"></i> Zum Adminbereich
|
||||
</a>
|
||||
{% elseif app.user and is_granted('ROLE_CHAT_USER') %}
|
||||
<a class="btn btn-info" href="{{ path('chat_index') }}">
|
||||
<i class="bi bi-chat-dots"></i> Zum Chat
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="btn btn-info" href="{{ path('chat_login') }}">
|
||||
<i class="bi bi-box-arrow-in-right"></i> Zur Chat-Anmeldung
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user