Logo Search packages:      
Sourcecode: zope-pas version File versions  Download package

def PluggableAuthService-1.4::plugins::ZODBGroupManager::ZODBGroupManager::listAvailablePrincipals (   self,
  group_id,
  search_id 
)

Return a list of principal IDs to that can belong to the group.

o If supplied, 'search_id' constrains the principal IDs;  if not,
  return empty list.

o Omit principals with existing assignments.

Definition at line 212 of file ZODBGroupManager.py.

00212                                                             :

        """ Return a list of principal IDs to that can belong to the group.

        o If supplied, 'search_id' constrains the principal IDs;  if not,
          return empty list.

        o Omit principals with existing assignments.
        """
        result = []

        if search_id:  # don't bother searching if no criteria

            parent = aq_parent( self )

            for info in parent.searchPrincipals( max_results=20
                                               , sort_by='id'
                                               , id=search_id
                                               , exact_match=False
                                               ):
                id = info[ 'id' ]
                title = info.get( 'title', id )
                if ( group_id not in self._principal_groups.get( id, () )
                 and group_id != id ):
                    result.append( ( id, title ) )

        return result

    security.declareProtected( ManageGroups, 'listAssignedPrincipals' )
    def listAssignedPrincipals( self, group_id ):


Generated by  Doxygen 1.6.0   Back to index