Back to index

plone3  3.1.7
Public Member Functions
CMFCore.tests.test_FSSecurity.FSSecurityTests Class Reference
Inheritance diagram for CMFCore.tests.test_FSSecurity.FSSecurityTests:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.tests.test_FSSecurity.FSSecurityTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_basicPermissions
def test_invalidPermissionNames
def test_invalidAcquireNames
def setUp
def tearDown

Detailed Description

Definition at line 74 of file test_FSSecurity.py.


Member Function Documentation

Definition at line 55 of file test_FSSecurity.py.

00055 
00056     def setUp( self ):
00057         # initialise skins
00058         WritableFSDVTest.setUp(self)
00059         self._registerDirectory(self)
00060         # set up ZODB
00061         RequestTest.setUp(self)
00062         # put object in ZODB
00063         root=self.root
00064         try: root._delObject('fake_skin')
00065         except AttributeError: pass
00066         root._setObject( 'fake_skin', self.ob.fake_skin )

Here is the call graph for this function:

Definition at line 67 of file test_FSSecurity.py.

00067 
00068     def tearDown( self ):
00069         RequestTest.tearDown(self)
00070         WritableFSDVTest.tearDown(self)
00071         self._ignore_log_errors()
00072         self._ignore_log_errors(subsystem='CMFCore.DirectoryView')
00073 

Here is the call graph for this function:

Definition at line 76 of file test_FSSecurity.py.

00076 
00077     def test_basicPermissions( self ):
00078         # Test basic FS permissions
00079         # check a normal method is as we'd expect
00080         self._checkSettings(self.ob.fake_skin.test1,'View',1,[])
00081         # now do some checks on the method with FS permissions
00082         self._checkSettings(self.ob.fake_skin.test4,'View',1,['Manager','Owner'])
00083         self._checkSettings(self.ob.fake_skin.test4,'Access contents information',0,[])

Here is the call graph for this function:

Definition at line 95 of file test_FSSecurity.py.

00095 
00096     def test_invalidAcquireNames( self ):
00097         # Test for an invalid spelling of acquire
00098         # baseline
00099         self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
00100         # add dodgy .rpm
00101         self._writeFile('test5.py.security','View:aquire:')
00102         # check baseline
00103         self._checkSettings(self.ob.fake_skin.test5,'View',1,[])

Here is the call graph for this function:

Definition at line 84 of file test_FSSecurity.py.

00084 
00085     def test_invalidPermissionNames( self ):
00086         import logging
00087         self._catch_log_errors(logging.ERROR,subsystem='CMFCore.DirectoryView')
00088         # Test for an invalid permission name
00089         # baseline
00090         self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
00091         # add .rpm with dodgy permission name
00092         self._writeFile('test5.py.security','Access stoopid contents::')
00093         # check baseline
00094         self._checkSettings(self.ob.fake_skin.test5,'View',1,[])

Here is the call graph for this function:


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