From 9a0b941fe64f847dea2453e34b8b7cd0b3cfbb90 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 25 Aug 2006 15:51:51 +0000
Subject: [PATCH] newContent should be public, the check is done in
 TypeInformation.constructInstance

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9468 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/Document/Folder.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/product/ERP5Type/Document/Folder.py b/product/ERP5Type/Document/Folder.py
index 8cd9e184af..c2588299b5 100644
--- a/product/ERP5Type/Document/Folder.py
+++ b/product/ERP5Type/Document/Folder.py
@@ -64,13 +64,14 @@ class FolderMixIn(ExtensionClass.Base, CopyContainer):
   security = ClassSecurityInfo()
   security.declareObjectProtected(Permissions.AccessContentsInformation)
 
-  security.declareProtected(Permissions.AddPortalContent, 'newContent')
+  security.declarePublic('newContent')
   def newContent(self, id=None, portal_type=None, id_group=None,
           default=None, method=None, immediate_reindex=0,
           container=None, created_by_builder=0, activate_kw=None,
           is_indexable=None, **kw):
-    """
-      Creates a new content
+    """Creates a new content.
+    This method is public, since TypeInformation.constructInstance will perform
+    the security check.
     """
     if container is None:
       container = self
-- 
2.30.9