Skip to content

Commit f5fecd8

Browse files
author
Richard Jones
committed
just running the eyes over that code again
1 parent 40786bc commit f5fecd8

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

roundup/mailgw.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class node. Any parts of other types are each stored in separate files
7272
an exception, the original message is bounced back to the sender with the
7373
explanatory 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

Comments
 (0)