[go: up one dir, main page]

Skip to content

Simple user authorization to use alongside with Flask-Login

License

Notifications You must be signed in to change notification settings

mkrd/Flask-Authorization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask-Authorization

Downloads Downloads Downloads

Simple user authorization to use alongside with Flask-Login.

Installation

pip3 install Flask-Authorization

Usage

from flask_Authorization import Authorize
authorize = Authorize()

# Initialize Extension
authorize.init_app(app)

For Flask-Authorization to work properly, your user models needs to implement a function called get_permissions() that returns a list of permissions. You can define any permissions you like, but "ROOT", "ADMIN", "USER" are recommended. Flask-Authorization will check if the current user has the required permissions on routes decorated with the @flask_authorization.permission_required(permission) decorator.

About

Simple user authorization to use alongside with Flask-Login

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages