[CMF-checkins] CVS: CMF/CMFCore/tests/base - dummy.py:1.6.4.3
Yvo Schubbe
schubbe at web.de
Mon Sep 29 07:13:06 EDT 2003
Update of /cvs-repository/CMF/CMFCore/tests/base
In directory cvs.zope.org:/tmp/cvs-serv25044/CMFCore/tests/base
Modified Files:
Tag: CMF-1_4-branch
dummy.py
Log Message:
fixed getCandidateLocalRoles:
- filter out 'Member' correctly (Collector #148 and #169)
- also filter out 'Authenticated'
=== CMF/CMFCore/tests/base/dummy.py 1.6.4.2 => 1.6.4.3 ===
--- CMF/CMFCore/tests/base/dummy.py:1.6.4.2 Wed Jun 11 07:10:42 2003
+++ CMF/CMFCore/tests/base/dummy.py Mon Sep 29 07:12:35 2003
@@ -3,7 +3,7 @@
from Products.CMFCore.PortalContent import PortalContent
from Products.CMFCore.TypesTool import FactoryTypeInformation as FTI
from Products.CMFCore.ActionProviderBase import ActionProviderBase
-from security import OmnipotentUser
+from security import OmnipotentUser
class DummyObject(Implicit):
@@ -175,6 +175,7 @@
_domain = 'http://www.foobar.com'
_path = 'bar'
+ __ac_roles__ = ('Member', 'Reviewer')
def absolute_url(self, relative=0):
return '/'.join( (self._domain, self._path, self._id) )
@@ -206,9 +207,15 @@
return 0
if object_roles:
if 'FooAdder' in object_roles:
- return 0
+ return 0
return 1
+ def getRolesInContext(self, object):
+ return ('Authenticated', 'Dummy', 'Member')
+
+ def getRoles(self):
+ return ('Authenticated', 'Member')
+
class DummyUserFolder(Implicit):
""" A dummy User Folder with 2 dummy Users.
@@ -219,7 +226,7 @@
def __init__(self):
setattr( self, 'user_foo', DummyUser(id='user_foo') )
setattr( self, 'user_bar', DummyUser(id='user_bar') )
- setattr( self, 'all_powerful_Oz', OmnipotentUser() )
+ setattr( self, 'all_powerful_Oz', OmnipotentUser() )
def getUsers(self):
pass
More information about the CMF-checkins
mailing list