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.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d225445e512ee8300e777ba2270ba68188d4175e2f3aca493c1eb44f50afed3 |
|
MD5 | 81ee2fa4c03899c5d77cfd2b16be9ac3 |
|
BLAKE2b-256 | 473128dc0e1d0b9545379b181f7f0d88079dc51a1fbd87742d4a9fdb80cac847 |