@@ -72,7 +72,7 @@ class node. Any parts of other types are each stored in separate files
7272an exception, the original message is bounced back to the sender with the
7373explanatory message given in the exception.
7474
75- $Id: mailgw.py,v 1.149.2.3 2004-09-29 08:47:59 a1s Exp $
75+ $Id: mailgw.py,v 1.149.2.4 2004-10-11 05:20:37 richard Exp $
7676"""
7777__docformat__ = 'restructuredtext'
7878
@@ -572,6 +572,10 @@ def handle_Message(self, message):
572572 m .append (s .getvalue ())
573573 self .mailer .bounce_message (message , sendto , m )
574574
575+ def hasPermissions (self , author , classname , nodeid ):
576+ # make sure they're allowed to edit this class of information
577+ return self .db .security .hasPermission ('Edit' , author , classname )
578+
575579 def handle_message (self , message ):
576580 ''' message - a Message instance
577581
@@ -790,8 +794,7 @@ def handle_message(self, message):
790794 raise Unauthorized , 'You are not permitted to access ' \
791795 'this tracker.'
792796
793- # make sure they're allowed to edit this class of information
794- if not self .db .security .hasPermission ('Edit' , author , classname ):
797+ if not self .hasPermissions (author , classname , nodeid ):
795798 raise Unauthorized , 'You are not permitted to edit %s.' % classname
796799
797800 # the author may have been created - make sure the change is
0 commit comments