Simple user authorization to use alongside with Flask-Login
Project description
Flask-Authorization
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for flask_authorization-1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d307bd74a2b85789f0b031e59c79e9485806e2c7204bf9c4dd98217faaf286e |
|
MD5 | 23924995917eccf347089f4efc5fc056 |
|
BLAKE2b-256 | 7c19bd0ae27672265ab146cf2ca32810d64bbb95afe4380212796fd87cd75c49 |