[Erp5-report] r28889 - /erp5/trunk/products/ERP5/Document/Document.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Sep 10 11:08:57 CEST 2009
Author: nicolas
Date: Thu Sep 10 11:08:55 2009
New Revision: 28889
URL: http://svn.erp5.org?rev=28889&view=rev
Log:
Add docstring and declare security for updateContentMd5 method
Modified:
erp5/trunk/products/ERP5/Document/Document.py
Modified: erp5/trunk/products/ERP5/Document/Document.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Document.py?rev=28889&r1=28888&r2=28889&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Document.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/Document.py [utf8] Thu Sep 10 11:08:55 2009
@@ -238,7 +238,10 @@
"""
return str(makeSortedTuple(kw)).translate(string.maketrans('', ''), '[]()<>\'", ')
+ security.declareProtected(Permissions.ModifyPortalContent, 'updateContentMd5')
def updateContentMd5(self):
+ """Update md5 checksum from the original file
+ """
data = self.getData()
self._setContentMd5(md5.new(data).digest()) #reindex is useless
More information about the Erp5-report
mailing list