Back to index

plone3  3.1.7
Public Member Functions | Private Attributes
PluggableAuthService.plugins.ZODBUserManager._ZODBUserFilter Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Private Attributes

 _filter_ids
 _filter_logins
 _filter_keywords

Detailed Description

Definition at line 521 of file ZODBUserManager.py.


Constructor & Destructor Documentation

def PluggableAuthService.plugins.ZODBUserManager._ZODBUserFilter.__init__ (   self,
  id = None,
  login = None,
  kw 
)

Definition at line 527 of file ZODBUserManager.py.

00527 
00528                 ):
00529 
00530         self._filter_ids = id
00531         self._filter_logins = login
00532         self._filter_keywords = kw


Member Function Documentation

Definition at line 533 of file ZODBUserManager.py.

00533 
00534     def __call__( self, user_info ):
00535 
00536         if self._filter_ids:
00537 
00538             key = 'id'
00539             to_test = self._filter_ids
00540 
00541         elif self._filter_logins:
00542 
00543             key = 'login'
00544             to_test = self._filter_logins
00545 
00546         elif self._filter_keywords:
00547             return 0    # TODO:  try using 'kw'
00548 
00549         else:
00550             return 1    # the search is done without any criteria
00551 
00552         value = user_info.get( key )
00553 
00554         if not value:
00555             return 0
00556 
00557         for contained in to_test:
00558             if value.lower().find( contained.lower() ) >= 0:
00559                 return 1
00560 
00561         return 0

Here is the caller graph for this function:


Member Data Documentation

Definition at line 529 of file ZODBUserManager.py.

Definition at line 531 of file ZODBUserManager.py.

Definition at line 530 of file ZODBUserManager.py.


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