Guys I need to use Flask-RESTful API with Flask-User. The way of using flask restful is below
from flask import Flask from flask_restful import Resource, Api app = Flask(__name__) api = Api(app) class HelloWorld(Resource): def get(self): return {'hello': 'world'} api.add_resource(HelloWorld, '/') if __name__ == '__main__': app.run(debug=True)whereas the way for using Role-based Authorization in Flask-User is below
from flask_user import roles_required @route('/admin/dashboard') # @route() must always be the outer-most decorator @roles_required('Admin') def admin_dashboard(): # render the admin dashboardCleary flask restful doesn't involve decorators for routes above functions, instead it involves resources. And flask user provides role based authorization in the form of decorators above the same functions not present in flask. So how can I use such role-based-authorization of Flask User with Flask restful ?