@@ -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.171 2006-01-25 03:20:35 richard Exp $
75+ $Id: mailgw.py,v 1.172 2006-01-25 03:51:21 richard Exp $
7676"""
7777__docformat__ = 'restructuredtext'
7878
@@ -852,10 +852,12 @@ def handle_message(self, message):
852852 # make sure they're allowed to edit or create this class of information
853853 if nodeid :
854854 if not self .db .security .hasPermission ('Edit' , author , classname ):
855- raise Unauthorized , 'You are not permitted to edit %s.' % classname
855+ raise Unauthorized , 'You are not permitted to ' \
856+ 'edit %s.' % classname
856857 else :
857858 if not self .db .security .hasPermission ('Create' , author , classname ):
858- raise Unauthorized , 'You are not permitted to create %s.' % classname
859+ raise Unauthorized , 'You are not permitted to ' \
860+ 'create %s.' % classname
859861
860862 # the author may have been created - make sure the change is
861863 # committed before we reopen the database
@@ -962,8 +964,10 @@ def handle_message(self, message):
962964 else :
963965 files .append (fileid )
964966 # attach the files to the issue
965- if not self .db .security .hasPermission ('Edit' , author , classname , 'files' ):
966- raise Unauthorized , 'You are not permitted to add files to %s.' % classname
967+ if not self .db .security .hasPermission ('Edit' , author ,
968+ classname , 'files' ):
969+ raise Unauthorized , 'You are not permitted to add ' \
970+ 'files to %s.' % classname
967971
968972 if nodeid :
969973 # extend the existing files list
@@ -992,8 +996,10 @@ def handle_message(self, message):
992996%s
993997''' % error
994998 # attach the message to the node
995- if not self .db .security .hasPermission ('Edit' , author , classname , 'messages' ):
996- raise Unauthorized , 'You are not permitted to add messages to %s.' % classname
999+ if not self .db .security .hasPermission ('Edit' , author ,
1000+ classname , 'messages' ):
1001+ raise Unauthorized , 'You are not permitted to add ' \
1002+ 'messages to %s.' % classname
9971003
9981004 if nodeid :
9991005 # add the message to the node's list
@@ -1017,8 +1023,10 @@ def handle_message(self, message):
10171023
10181024 # Check permissions for each property
10191025 for prop in props .keys ():
1020- if not self .db .security .hasPermission ('Edit' , author , classname , prop ):
1021- raise Unauthorized , 'You are not permitted to edit property %s of class %s.' % (prop ,classname )
1026+ if not self .db .security .hasPermission ('Edit' , author ,
1027+ classname , prop ):
1028+ raise Unauthorized , 'You are not permitted to edit ' \
1029+ 'property %s of class %s.' % (prop ,classname )
10221030
10231031 if nodeid :
10241032 cl .set (nodeid , ** props )
0 commit comments