def decorator(*args, **kwargs): user = flask_login.current_user if not all(user.can(perm) for perm in permissions): return render_queue('error.html', message='Permission Denied.', action='Home', url=url_for('queue.home')) return f(*args, **kwargs)
def render_admin(template: str, *args, **context) -> str: """Special rendering for queue admin.""" return render_queue(template, *args, **context)