Commit 3ace26b2 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

do not cache _allowedContentTypes and _getVisibleAllowedContentTypeList for...

do not cache _allowedContentTypes and _getVisibleAllowedContentTypeList for correct permission checking.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16976 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5d062875
......@@ -1232,10 +1232,6 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
portal_type = self.getPortalType()
portal_path = portal.getPhysicalPath()
_getVisibleAllowedContentTypeList = CachingMethod(
_getVisibleAllowedContentTypeList,
id=("_getAllowedContentTypeTitleList", user, portal_path, portal_type),
cache_factory='erp5_content_long')
return _getVisibleAllowedContentTypeList()
security.declarePublic('allowedContentTypes')
......@@ -1270,9 +1266,6 @@ class Folder(CopyContainer, CMFBTreeFolder, CMFHBTreeFolder, Base, FolderMixIn,
type_list.sort(compareTypes)
return ['/'.join(x.getPhysicalPath()) for x in type_list]
_allowedContentTypes = CachingMethod( _allowedContentTypes,
id = 'allowedContentTypes',
cache_factory = 'erp5_content_long')
user = str(_getAuthenticatedUser(self))
portal_type = self.getPortalType()
portal = self.getPortalObject()
......
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