Изменение прав доступа к блюпринтам + заглушка для квартального отчета

This commit is contained in:
2024-11-05 22:56:32 +03:00
parent 0ed78f9e8c
commit c4ad849fb3
3 changed files with 7 additions and 7 deletions

View File

@@ -1,9 +1,9 @@
from flask import request, Blueprint, render_template
from ..checker import check_auth
from checker import check_auth
from os import path
import json
with open(path.join(path.dirname(__file__), 'zapros_menu.json')) as f:
with open(path.join(path.dirname(__file__), 'reports.json')) as f:
report_list = json.load(f)
report_bp = Blueprint('report_bp', __name__, template_folder='templates')
@@ -14,8 +14,8 @@ def menu():
if request.method == 'GET':
return render_template('report_menu.html', options=report_list)
@report_bp.route('/quarterly', methods=['GET', 'POST'])
@report_bp.route('/quaterly', methods=['GET', 'POST'])
@check_auth
def quarterly():
def quaterly():
if request.method == 'GET':
return render_template('quarterly.html')
return render_template('quaterly.html')

View File

@@ -1,5 +1,5 @@
{
"Менеджер": ["auth_bp", "requests_bp"],
"Управляющий": ["auth_bp", "requests_bp"],
"Поставщик": ["auth_bp", "requests_bp", "waybill_bp"]
"Управляющий": ["auth_bp", "requests_bp", "report_bp"],
"Поставщик": ["auth_bp", "waybill_bp"]
}