*** /tmp/mailgw.py Tue Sep 21 18:08:03 2004 --- /tmp/mailgw.py60997Ni Tue Sep 21 18:08:03 2004 *************** *** 569,574 **** --- 569,578 ---- m.append(s.getvalue()) self.mailer.bounce_message(message, sendto, m) + def hasPermissions(self, author, classname, nodeid): + # make sure they're allowed to edit this class of information + return self.db.security.hasPermission('Edit', author, classname) + def handle_message(self, message): ''' message - a Message instance *************** *** 785,792 **** raise Unauthorized, 'You are not permitted to access '\ 'this tracker.' ! # make sure they're allowed to edit this class of information ! if not self.db.security.hasPermission('Edit', author, classname): raise Unauthorized, 'You are not permitted to edit %s.'%classname # the author may have been created - make sure the change is --- 789,795 ---- raise Unauthorized, 'You are not permitted to access '\ 'this tracker.' ! if not self.hasPermissions(author, classname, nodeid): raise Unauthorized, 'You are not permitted to edit %s.'%classname # the author may have been created - make sure the change is