Back to index

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

List of all members.

Public Member Functions

def manage_afterAdd
def enumerateGroups
 group interface implementation
def getGroupsForPrincipal
def addGroup
 group management
def addPrincipalToGroup
def updateGroup
def setRolesForGroup
def removeGroup
def removePrincipalFromGroup
def getGroupById
 group introspection
def getGroupIds
def getGroups
def getGroupMembers
def getGroupInfo

Static Public Attributes

string meta_type = "GRUF Bridge"
tuple addGroup = postonly(addGroup)
tuple addPrincipalToGroup = postonly(addPrincipalToGroup)
tuple updateGroup = postonly(updateGroup)
tuple setRolesForGroup = postonly(setRolesForGroup)
tuple removeGroup = postonly(removeGroup)
tuple removePrincipalFromGroup = postonly(removePrincipalFromGroup)

Private Member Functions

def _getUserFolder
def _demangle

Detailed Description

Definition at line 67 of file gruf.py.


Member Function Documentation

def PlonePAS.plugins.gruf.GRUFBridge._demangle (   self,
  princid 
) [private]

Definition at line 164 of file gruf.py.

00164 
00165     def _demangle(self, princid):
00166         unmangle_fn = self.aq_acquire('_unmangleId') # acquire from PAS
00167         unmangled_princid = unmangle_fn(princid)[-1]
00168         return unmangled_princid
00169 
00170 classImplements(GRUFBridge,
00171                 plugins.IGroupsPlugin, plugins.IGroupEnumerationPlugin,
00172                 *implementedBy(DelegatingMultiPlugin))
00173 
00174 InitializeClass(GRUFBridge)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 74 of file gruf.py.

00074 
00075     def _getUserFolder(self):
00076         return self.acl_users

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.addGroup (   self,
  group_id,
  REQUEST = None 
)

group management

Definition at line 108 of file gruf.py.

00108 
00109     def addGroup(self, group_id, REQUEST=None):
00110         self._getUserFolder().userFolderAddGroup( group_id, (), () )
        return True

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.addPrincipalToGroup (   self,
  principal_id,
  group_id,
  REQUEST = None 
)

Definition at line 113 of file gruf.py.

00113 
00114     def addPrincipalToGroup(self, principal_id, group_id, REQUEST=None):
00115         group = self._getUserFolder().getGroupById( group_id )
        group.addMember( principal_id )

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.enumerateGroups (   self,
  id = None,
  title = None,
  exact_match = False,
  sort_by = None,
  max_results = None,
  kw 
)

group interface implementation

Definition at line 88 of file gruf.py.

00088 
00089                          ):
00090 
00091         gruf = self._getUserFolder()
00092         groups = gruf.getGroups()
00093         filter = GroupFilter( id, exact_match, **kw )
00094         if max_results is None:
00095             max_results = -1
00096         return [self.getGroupInfo( group ) for group in groups if filter(group)][:max_results]

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.getGroupById (   self,
  group_id 
)

group introspection

Definition at line 141 of file gruf.py.

00141 
00142     def getGroupById( self, group_id ):
00143         return self._getUserFolder().getGroupById( group_id )

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 144 of file gruf.py.

00144 
00145     def getGroupIds(self):
00146         # gruf returns these prefixed
00147         return self._getUserFolder().getGroupIds()

Here is the call graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.getGroupInfo (   self,
  group 
)

Definition at line 155 of file gruf.py.

00155 
00156     def getGroupInfo(self, group):
00157         url = group.absolute_url()
00158         return {
00159             'id' : group.getId(),
00160             'pluginid' : self.getId(),
00161             'members_url' : url,
00162             'properties_url' : url,
00163             }

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.getGroupMembers (   self,
  group_id 
)

Definition at line 151 of file gruf.py.

00151 
00152     def getGroupMembers(self, group_id):
00153         return self._getUserFolder().getMemberIds(group_id)

Here is the call graph for this function:

Definition at line 148 of file gruf.py.

00148 
00149     def getGroups(self):
00150         return self._getUserFolder().getGroups()

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.getGroupsForPrincipal (   self,
  principal,
  request = None 
)

Definition at line 98 of file gruf.py.

00098 
00099     def getGroupsForPrincipal( self, principal, request=None ):
00100         gruf = self._getUserFolder()
00101         pid = self._demangle( principal.getId() )
00102         gruf_principal = gruf.getUser( pid )
00103         return gruf_principal.getGroupsWithoutPrefix()

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.manage_afterAdd (   self,
  item,
  container 
)

Definition at line 71 of file gruf.py.

00071 
00072     def manage_afterAdd(self, item, container):
00073         self.manage_addProduct['GroupUserFolder'].manage_addGroupUserFolder()

Here is the call graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.removeGroup (   self,
  group_id,
  REQUEST = None 
)

Definition at line 128 of file gruf.py.

00128 
00129     def removeGroup(self, group_id, REQUEST=None):
        return self._getUserFolder().userFolderDelGroups( (group_id, ) )

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.removePrincipalFromGroup (   self,
  principal_id,
  group_id,
  REQUEST = None 
)

Definition at line 132 of file gruf.py.

00132 
00133     def removePrincipalFromGroup(self, principal_id, group_id, REQUEST=None):
00134         group = self._getUserFolder().getGroupById( group_id )
00135         group.removeMember( principal_id )
        return True

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.setRolesForGroup (   self,
  group_id,
  roles = (),
  REQUEST = None 
)

Definition at line 123 of file gruf.py.

00123 
00124     def setRolesForGroup(self, group_id, roles=(), REQUEST=None):
00125         # doing it this way will lose subgroups..
        self._getUserFolder().userFolderEditGroup( group_id, roles )

Here is the call graph for this function:

Here is the caller graph for this function:

def PlonePAS.plugins.gruf.GRUFBridge.updateGroup (   self,
  group_id,
  REQUEST = None,
  kw 
)

Definition at line 119 of file gruf.py.

00119 
00120     def updateGroup(self, group_id, REQUEST=None, **kw):
        pass

Here is the caller graph for this function:


Member Data Documentation

Definition at line 111 of file gruf.py.

Definition at line 116 of file gruf.py.

string PlonePAS.plugins.gruf.GRUFBridge.meta_type = "GRUF Bridge" [static]

Definition at line 69 of file gruf.py.

Definition at line 130 of file gruf.py.

Definition at line 136 of file gruf.py.

Definition at line 126 of file gruf.py.

Definition at line 121 of file gruf.py.


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