l.s.w.authorization : module documentation

Part of lp.services.webapp

No module docstring
Class LaunchpadSecurityPolicy No class docstring; 6/7 methods documented
Function iter_authorization Work through IAuthorization adapters for objecttoauthorize.
Function precache_permission_for_objects Precaches the permission for the objects into the policy cache.
Function check_permission Like zope.security.management.checkPermission, but also ensures that
Function clear_cache clear current interaction's IApplicationRequests' authorization caches.
Class LaunchpadPermissiveSecurityPolicy Undocumented
Class available_with_permission Function decorator that ensures the user has the given permission on
def iter_authorization(objecttoauthorize, permission, principal, cache, breadth_first=True):
Work through IAuthorization adapters for objecttoauthorize.

Adapters are permitted to delegate checks to other adapters, and this manages that delegation such that the minimum number of checks are made, subject to a breadth-first check of delegations.

This also updates cache as it goes along, though cache can be None if no caching is desired. Only leaf values are cached; the results of a delegated authorization are not cached.

def precache_permission_for_objects(participation, permission_name, objects):
Precaches the permission for the objects into the policy cache.
def check_permission(permission_name, context):
Like zope.security.management.checkPermission, but also ensures that permission_name is real permission.

Raises ValueError if the permission doesn't exist.

def clear_cache():
clear current interaction's IApplicationRequests' authorization caches.
API Documentation for Launchpad, generated by pydoctor at 2018-05-24 00:00:11.