– Pecan Secure Controllers

The module includes a basic framework for building security into your applications.

This method unlocks method or class attribute on a SecureController. Can be used to decorate or wrap an attribute, check_permissions_for_obj=None)

This method secures a method or class depending on invocation.

To decorate a method use one argument:
To secure a class, invoke with two arguments:
secure(<obj instance>, <check_permissions_method>)

Bases: object

classmethod check_permissions()

Returns True or False to grant access. Implemented in subclasses of SecureController.



Used to apply security to a controller. Implementations of SecureController should extend the check_permissions method to return a True or False value (depending on whether or not the user has permissions to the controller).