Reputation: 2229
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
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
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
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