Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Private Attributes
CMFCore.tests.base.security.UserWithRoles Class Reference
Inheritance diagram for CMFCore.tests.base.security.UserWithRoles:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.tests.base.security.UserWithRoles:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getId
def getRoles
def allowed

Static Public Attributes

 getUserName = getId

Private Attributes

 _roles

Detailed Description

  User with roles specified in constructor
  for unit testing purposes.

Definition at line 76 of file security.py.


Constructor & Destructor Documentation

Definition at line 81 of file security.py.

00081 
00082     def __init__( self, *roles ):
00083         self._roles = roles


Member Function Documentation

def CMFCore.tests.base.security.UserWithRoles.allowed (   self,
  object,
  object_roles = None 
)

Definition at line 92 of file security.py.

00092 
00093     def allowed( self, object, object_roles=None ):
00094         if object_roles is None:
00095             object_roles=()
00096         for orole in object_roles:
00097             if orole in self._roles:
00098                 return 1
00099         return 0

Here is the caller graph for this function:

Definition at line 84 of file security.py.

00084 
00085     def getId( self ):
00086         return 'high_roller'

Definition at line 89 of file security.py.

00089 
00090     def getRoles(self):
00091         return self._roles

Here is the caller graph for this function:


Member Data Documentation

Definition at line 82 of file security.py.

Definition at line 87 of file security.py.


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