Commit 0b5a6984 authored by Julien Muchembled's avatar Julien Muchembled

Make temporary objects public.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27033 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b57a0c16
...@@ -417,7 +417,7 @@ class TempDocumentConstructor(DocumentConstructor): ...@@ -417,7 +417,7 @@ class TempDocumentConstructor(DocumentConstructor):
# Create a new class to set permissions specific to temporary objects. # Create a new class to set permissions specific to temporary objects.
class TempDocument(klass): class TempDocument(klass):
isTempDocument = 1 isTempDocument = 1
pass __roles__ = None
# Replace some attributes. # Replace some attributes.
for name in ('isIndexable', 'reindexObject', 'recursiveReindexObject', for name in ('isIndexable', 'reindexObject', 'recursiveReindexObject',
......
...@@ -287,10 +287,11 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor): ...@@ -287,10 +287,11 @@ class TestERP5Type(PropertySheetTestCase, LogInterceptor):
# check we can create temp object without specific roles/permissions # check we can create temp object without specific roles/permissions
self.logout() self.logout()
self.loginWithNoRole() self.loginWithNoRole()
o = newTempOrganisation(portal,'b') o = newTempOrganisation(portal.organisation_module,'b')
self.assertEquals(o.isTempObject(), 1) self.assertEquals(o.isTempObject(), 1)
a = o.newContent(portal_type = 'Telephone') a = o.newContent(portal_type = 'Telephone')
self.assertEquals(a.isTempObject(), 1) self.assertEquals(a.isTempObject(), 1)
self.assertEquals(a, guarded_getattr(o, a.getId()))
self.logout() self.logout()
self.login() self.login()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment