[Erp5-report] r13322 - /erp5/trunk/products/ERP5/Document/Url.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Mar 12 09:24:46 CET 2007


Author: jp
Date: Mon Mar 12 09:24:45 2007
New Revision: 13322

URL: http://svn.erp5.org?rev=13322&view=rev
Log:
Added permissions for send by mail.

Modified:
    erp5/trunk/products/ERP5/Document/Url.py

Modified: erp5/trunk/products/ERP5/Document/Url.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/Url.py?rev=13322&r1=13321&r2=13322&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/Url.py (original)
+++ erp5/trunk/products/ERP5/Document/Url.py Mon Mar 12 09:24:45 2007
@@ -82,7 +82,7 @@
     """
     return ("http://www.erp5.org","mailto:info@erp5.org")
 
-
+  security.declareProtected(Permissions.UseMailhostServices, 'send')
   def send(self, from_url=None, to_url=None, msg=None, subject=None,  attachment_list=None):
     """
     This method was previously named 'SendMail' and is used to send email
@@ -103,7 +103,7 @@
         to_url = self.getUrlString(None)
       if from_url is None or to_url is None:
         raise AttributeError, "No mail defined"
-      
+
       # Create multi-part MIME message.
       message = StringIO()
       writer = MimeWriter(message)




More information about the Erp5-report mailing list