Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions | Private Attributes
PluggableAuthService.tests.test_PluggableAuthService.FauxUser Class Reference
Inheritance diagram for PluggableAuthService.tests.test_PluggableAuthService.FauxUser:
Inheritance graph
[legend]
Collaboration diagram for PluggableAuthService.tests.test_PluggableAuthService.FauxUser:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getId
def getUserName
def getRoles
def getGroups
def allowed
def __repr__

Private Member Functions

def _addGroups
def _addRoles

Private Attributes

 _id
 _name
 _roles
 _groups

Detailed Description

Definition at line 308 of file test_PluggableAuthService.py.


Constructor & Destructor Documentation

def PluggableAuthService.tests.test_PluggableAuthService.FauxUser.__init__ (   self,
  id,
  name = None,
  roles = {},
  groups = {} 
)

Definition at line 310 of file test_PluggableAuthService.py.

00310 
00311     def __init__( self, id, name=None, roles={}, groups={} ):
00312 
00313         self._id = id
00314         self._name = name
00315         self._roles = roles
00316         self._groups = groups


Member Function Documentation

Definition at line 349 of file test_PluggableAuthService.py.

00349 
00350     def __repr__( self ):
00351 
00352         return '<FauxUser: %s>' % self._id

Definition at line 341 of file test_PluggableAuthService.py.

00341 
00342     def _addGroups(self, groups):
00343         for group in groups:
00344             self._groups[group] = 1

Definition at line 345 of file test_PluggableAuthService.py.

00345 
00346     def _addRoles(self, roles):
00347         for role in roles:
00348             self._roles[role] = 1

Definition at line 333 of file test_PluggableAuthService.py.

00333 
00334     def allowed( self, value, roles ):
00335 
00336         for role in roles:
00337             if role in self._roles:
00338                 return 1
00339 
00340         return 0

Definition at line 329 of file test_PluggableAuthService.py.

00329 
00330     def getGroups(self):
00331 
00332         return self._groups.keys()

Here is the caller graph for this function:

Definition at line 317 of file test_PluggableAuthService.py.

00317 
00318     def getId( self ):
00319 
00320         return self._id

Definition at line 325 of file test_PluggableAuthService.py.

00325 
00326     def getRoles( self ):
00327 
00328         return self._roles

Here is the caller graph for this function:

Definition at line 321 of file test_PluggableAuthService.py.

00321 
00322     def getUserName( self ):
00323 
00324         return self._name

Here is the caller graph for this function:


Member Data Documentation

Definition at line 315 of file test_PluggableAuthService.py.

Definition at line 312 of file test_PluggableAuthService.py.

Definition at line 313 of file test_PluggableAuthService.py.

Definition at line 314 of file test_PluggableAuthService.py.


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