Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes
PluggableAuthService.plugins.RecursiveGroupsPlugin.RecursiveGroupsPlugin Class Reference
Inheritance diagram for PluggableAuthService.plugins.RecursiveGroupsPlugin.RecursiveGroupsPlugin:
Inheritance graph
[legend]
Collaboration diagram for PluggableAuthService.plugins.RecursiveGroupsPlugin.RecursiveGroupsPlugin:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getGroupsForPrincipal

Public Attributes

 id
 title

Static Public Attributes

string meta_type = 'Recursive Groups Plugin'
tuple security = ClassSecurityInfo()

Private Attributes

 _id

Detailed Description

PAS plugin for recursively flattening a collection of groups

Definition at line 69 of file RecursiveGroupsPlugin.py.


Constructor & Destructor Documentation

Definition at line 77 of file RecursiveGroupsPlugin.py.

00077 
00078     def __init__(self, id, title=None):
00079 
00080         self._id = self.id = id
00081         self.title = title


Member Function Documentation

Definition at line 86 of file RecursiveGroupsPlugin.py.

00086 
00087     def getGroupsForPrincipal( self, user, request=None ):
00088 
00089         set = list( user.getGroups() )
00090         seen = []
00091         parent = aq_parent( self )
00092 
00093         while set:
00094             test = set.pop(0)
00095             if test in seen:
00096                 continue
00097             seen.append( test )
00098             new_groups = parent._getGroupsForPrincipal(
00099                 PropertiedUser( test ).__of__(parent), 
00100                 ignore_plugins=( self.getId(), ) )
00101             if new_groups:
00102                 set.extend( new_groups )
00103 
00104         return tuple( seen )
00105 
00106 classImplements( RecursiveGroupsPlugin
00107                , IRecursiveGroupsPlugin
00108                , IGroupsPlugin
00109                )
00110 
00111 InitializeClass(RecursiveGroupsPlugin)

Member Data Documentation

Definition at line 79 of file RecursiveGroupsPlugin.py.

Definition at line 79 of file RecursiveGroupsPlugin.py.

Definition at line 73 of file RecursiveGroupsPlugin.py.

Definition at line 75 of file RecursiveGroupsPlugin.py.

Definition at line 80 of file RecursiveGroupsPlugin.py.


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