Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.portlets.checker.UserPortletPermissionChecker Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes

 context

Detailed Description

Definition at line 28 of file checker.py.


Constructor & Destructor Documentation

Definition at line 32 of file checker.py.

00032 
00033     def __init__(self, context):
00034         self.context = context
    

Here is the caller graph for this function:


Member Function Documentation

Definition at line 35 of file checker.py.

00035 
00036     def __call__(self):
00037         sm = getSecurityManager()
00038         context = aq_inner(self.context)
00039 
00040         # If the user has the global Manage Portlets permission, let them
00041         # run wild
00042         if not sm.checkPermission("Portlets: Manage own portlets", context):
00043             raise Unauthorized("You are not allowed to manage portlets")
00044             
00045         user_id = sm.getUser().getId()
00046         
00047         if context.__name__ != user_id:
            raise Unauthorized("You are only allowed to manage your own portlets")

Here is the caller graph for this function:


Member Data Documentation

Definition at line 33 of file checker.py.


The documentation for this class was generated from the following file: