added permission checks to user and recorder API

This commit is contained in:
Tobias Kurze
2020-08-06 15:23:14 +02:00
parent 82b3e78488
commit 437cec38e0
6 changed files with 59 additions and 24 deletions

View File

@@ -4,6 +4,7 @@ Backend base module
"""
import logging
import os
from functools import wraps
from io import StringIO
from logging.config import dictConfig
from logging.handlers import MemoryHandler
@@ -14,7 +15,7 @@ import jwt
import requests
from flask import Flask, jsonify, abort
from flask_httpauth import HTTPTokenAuth, HTTPBasicAuth, MultiAuth
from flask_jwt_extended import JWTManager, decode_token
from flask_jwt_extended import JWTManager, decode_token, get_jwt_identity
from flask_login import LoginManager
from flask_sqlalchemy import SQLAlchemy
from flask_cors import CORS
@@ -179,6 +180,7 @@ CORS(auth_api_bp)
logging.getLogger('flask_cors').level = logging.DEBUG
# Fix jwt_extended by 'duck typing' error handlers
# jwt_extended._set_error_handler_callbacks(api_v1) # removed for the moment, might raise new (old) problems