Flask-User
Flask-User copied to clipboard
Only want to use Flask-User for authorization...and not for authentication. Any suggestions please?
I already have my app working beautifully with Flask-Login where via the @login_required decorator I have two sets of pages: for_all_users, and second for logged_in_users.
Now, I need to add in authorization. I don't want to replace all my authentication logic in my app. From Flask-User I only want to use the very nice @roles_required decorator functionality.
Is this doable? Any examples? Thank you.
Hi.
Yes.
You just need to make db model compatible with Flask-User, and, for example, inherit from UserManager class and disable Flask-User's views that you don't need.