nopaque/app/admin/__init__.py

21 lines
425 B
Python
Raw Permalink Normal View History

from flask import Blueprint
2023-03-14 13:24:52 +00:00
from flask_login import login_required
from app.decorators import admin_required
bp = Blueprint('admin', __name__)
2023-03-14 13:24:52 +00:00
@bp.before_request
@login_required
@admin_required
def before_request():
'''
Ensures that the routes in this package can be visited only by users with
administrator privileges (login_required and admin_required).
'''
pass
from . import json_routes, routes