You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: