Nicht Admin mit Dispatcher vermischen
This commit is contained in:
1 parent
7b8d2ec396
commit
a16f28b040
2 files changed
+4
-4
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
Haupt-Views
|
Haupt-Views
|
||||||
"""
|
"""
|
||||||
from flask import Blueprint, render_template, g, redirect, url_for
|
from flask import Blueprint, render_template, g, redirect, url_for
|
||||||
from cmbnet.auth import login_required
|
from cmbnet.auth import login_required, role_required
|
||||||
|
|
||||||
views_bp = Blueprint('views', __name__)
|
views_bp = Blueprint('views', __name__)
|
||||||
|
|
||||||
@@ -27,14 +27,14 @@ def index(**kwargs):
|
|||||||
|
|
||||||
|
|
||||||
@views_bp.route('/dispatcher')
|
@views_bp.route('/dispatcher')
|
||||||
@login_required
|
@role_required('Dispatcher')
|
||||||
def dispatcher(**kwargs):
|
def dispatcher(**kwargs):
|
||||||
"""Dispatcher-View"""
|
"""Dispatcher-View"""
|
||||||
return render_template('dispatcher.html')
|
return render_template('dispatcher.html')
|
||||||
|
|
||||||
|
|
||||||
@views_bp.route('/dispatcher_mobil')
|
@views_bp.route('/dispatcher_mobil')
|
||||||
@login_required
|
@role_required('Dispatcher')
|
||||||
def dispatcher_mobil(**kwargs):
|
def dispatcher_mobil(**kwargs):
|
||||||
"""Dispatcher-Mobil-View"""
|
"""Dispatcher-Mobil-View"""
|
||||||
return render_template('dispatcher_mobil.html')
|
return render_template('dispatcher_mobil.html')
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Accountverwaltung</h1>
|
<h1>Accountverwaltung</h1>
|
||||||
<p><a href="{{ url_for('views.dispatcher', tenant=session.tenant_code) }}">← Zurück</a> | <a href="{{ url_for('auth.logout', tenant=session.tenant_code) }}">Abmelden</a></p>
|
<p><a href="{{ url_for('auth.logout', tenant=session.tenant_code) }}">Abmelden</a></p>
|
||||||
|
|
||||||
<table id="accountsTable">
|
<table id="accountsTable">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
Reference in new issue
Block a user