Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only want to use Flask-User for authorization...and not for authentication. Any suggestions please? #116

Open
rahulj123atwork opened this issue Apr 26, 2016 · 1 comment
Labels

Comments

@rahulj123atwork
Copy link

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.

@LotosikRa
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants