Cyclotron3x3
Cyclotron3x3

Reputation: 2229

RBAC feature in flask

I'm trying to create a Role Based Access Control system in my application dashboard. I have done it in PHP using Yii2 framework GitHub but I'm confused how to get it done in flask using python. I'm new to python.

I can't provide more details as I'm not clear with this.

Any suggestions welcome.

Upvotes: 0

Views: 1862

Answers (3)

techoner
techoner

Reputation: 1

If you use casbin in php, you can use the Yii-permission it provides, see here: https://github.com/php-casbin/yii-permission

Upvotes: 0

hsluoyz
hsluoyz

Reputation: 2919

You can use Casbin. Casbin supports both PHP (PHP-Casbin) and Python (PyCasbin). It also has the Yii middleware and Flask middleware. Here's the FLask middleware: https://github.com/pycasbin/flask-authz

Upvotes: 0

doru
doru

Reputation: 9110

There is such an extension for flask already: Flask-RBAC. If you want to code one yourself you should inspect the code of the existing one. Or you can use it in your applications.

Upvotes: 3

Related Questions