From e081f87d3fc7d65e86abf8606c0dbe7844c0c7a7 Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Sat, 10 Nov 2007 12:20:13 +0000 Subject: [PATCH] By default, File do not have any base data. Only certain classes should have it. Therefore, having base data and having data is equivalent. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17510 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/File.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/product/ERP5/Document/File.py b/product/ERP5/Document/File.py index af3295ef35..f2a926e9a6 100644 --- a/product/ERP5/Document/File.py +++ b/product/ERP5/Document/File.py @@ -171,6 +171,14 @@ class File(Document, CMFFile, ConversionCacheMixin): """ return self.hasData() + security.declareProtected(Permissions.AccessContentsInformation, 'hasBaseData') + def hasBaseData(self): + """ + By default, a File instance does not require conversion + to a base format. Therefore, hasBaseData must be overriden. + """ + return self.hasData() + security.declareProtected(Permissions.ModifyPortalContent, 'guessMimeType') def guessMimeType(self, fname=''): """ -- 2.30.9