In a Flask application, considering you have created a decorator that checks for specific permissions and it requires the current user which is obtained from flask_login, how should the decorators be ordered in the route that allows editing and requires login and edit permissions?
User roles
You are out of order!
Report a typo
Reorder lines using drag or arrows. Adjust indentation with left buttons
@login_required
@permission_for(Permission.edit)
@app.route('/edit')
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.