O'Reilly logo

Python 3 Web Development Beginner's Guide by Michel Anders

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action implementing role-based access control

Run the example application provided in access2.py and log in as admin. You will see that besides Users and Accounts, you are presented with links to Roles and Permissions as well. If you click on Roles, you will see we have defined several roles:

Time for action implementing role-based access control

As you can see in the screenshot, we have also defined a Superuser role to illustrate that it is possible to extend the concept of role-based access control to the maintenance of roles and permissions themselves.

What just happened?

Applications that use this form of access control have to be adapted only slightly. Take a look at access2.py:

Chapter9/access2.py ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required