Skip to main content

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


Release history Release notifications

This version

1.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Flask-Authorization, version 1.3
Filename, size File type Python version Upload date Hashes
Filename, size Flask_Authorization-1.3-py3-none-any.whl (3.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size Flask-Authorization-1.3.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page