Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
plone.app.contentrules.conditions.group.GroupConditionExecutor Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes

 context
 element
 event

Detailed Description

The executor for this condition.

This is registered as an adapter in configure.zcml

Definition at line 41 of file group.py.


Constructor & Destructor Documentation

def plone.app.contentrules.conditions.group.GroupConditionExecutor.__init__ (   self,
  context,
  element,
  event 
)

Definition at line 49 of file group.py.

00049 
00050     def __init__(self, context, element, event):
00051         self.context = context
00052         self.element = element
00053         self.event = event

Here is the caller graph for this function:


Member Function Documentation

Definition at line 54 of file group.py.

00054 
00055     def __call__(self):
00056         portal_membership = getToolByName(self.context, 'portal_membership', None)
00057         portal_groups = getToolByName(self.context, 'portal_groups', None)
00058         if portal_groups is None or portal_groups is None:
00059             return False
00060         member = portal_membership.getAuthenticatedMember()
00061         groupIds = [g.getId() for g in portal_groups.getGroupsByUserId(member.getId())]
00062         for g in self.element.group_names:
00063             if g in groupIds:
00064                 return True
00065         return False
        

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 50 of file group.py.

Definition at line 51 of file group.py.

Definition at line 52 of file group.py.


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