From: richard Date: Wed, 28 Nov 2001 21:55:35 +0000 (+0000) Subject: . login_action and newuser_action return values were being ignored X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d46fae7b1b6f9da734e537ffb8743e89d50b6a63;p=roundup.git . login_action and newuser_action return values were being ignored . Woohoo! Found that bloody re-login bug that was killing the mail gateway. (also a minor cleanup in hyperdb) git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@431 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index 1099230..7bb068a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -13,6 +13,9 @@ Feature: Fixed: . Lots of bugs, thanks Roché and others on the devel mailing list! + . login_action and newuser_action return values were being ignored + . Woohoo! Found that bloody re-login bug that was killing the mail + gateway. 2001-11-23 - 0.3.0 diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py index 4ce3bba..7cb0ba2 100644 --- a/roundup/cgi_client.py +++ b/roundup/cgi_client.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: cgi_client.py,v 1.66 2001-11-27 03:00:50 richard Exp $ +# $Id: cgi_client.py,v 1.67 2001-11-28 21:55:35 richard Exp $ __doc__ = """ WWW request handler (also used in the stand-alone server). @@ -711,6 +711,7 @@ class Client: return self.login(message=_('Incorrect password')) self.set_cookie(self.user, password) + return None # make it explicit def set_cookie(self, user, password): # construct the cookie @@ -761,7 +762,7 @@ class Client: self.user = cl.get(uid, 'username') password = cl.get(uid, 'password') self.set_cookie(self.user, self.form['password'].value) - return self.index() + return None # make the None explicit def main(self): # determine the uid to use @@ -815,7 +816,9 @@ class Client: # everyone is allowed to try to log in if action == 'login_action': # do the login - self.login_action() + ret = self.login_action() + if ret is not None: + return ret # figure the resulting page action = self.form['__destination_url'].value if not action: @@ -832,7 +835,9 @@ class Client: else: return self.login(action=action) # add the user - self.newuser_action() + ret = self.newuser_action() + if ret is not None: + return ret # figure the resulting page action = self.form['__destination_url'].value if not action: @@ -1041,6 +1046,9 @@ def parsePropsFromForm(db, cl, form, nodeid=0): # # $Log: not supported by cvs2svn $ +# Revision 1.66 2001/11/27 03:00:50 richard +# couple of bugfixes from latest patch integration +# # Revision 1.65 2001/11/26 23:00:53 richard # This config stuff is getting to be a real mess... # diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py index 4c9b511..10eaf38 100644 --- a/roundup/hyperdb.py +++ b/roundup/hyperdb.py @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: hyperdb.py,v 1.36 2001-11-27 03:16:09 richard Exp $ +# $Id: hyperdb.py,v 1.37 2001-11-28 21:55:35 richard Exp $ __doc__ = """ Hyperdatabase implementation, especially field types. @@ -158,11 +158,13 @@ class Class: value = self.db.classes[link_class].lookup(value) except: raise IndexError, 'new property "%s": %s not a %s'%( - key, value, self.properties[key].classname) - propvalues[key] = value - if not self.db.hasnode(link_class, value): + key, value, link_class) + elif not self.db.hasnode(link_class, value): raise IndexError, '%s has no node %s'%(link_class, value) + # save off the value + propvalues[key] = value + # register the link with the newly linked node self.db.addjournal(link_class, value, 'link', (self.classname, newid, key)) @@ -867,6 +869,9 @@ def Choice(name, *options): # # $Log: not supported by cvs2svn $ +# Revision 1.36 2001/11/27 03:16:09 richard +# Another place that wasn't handling missing properties. +# # Revision 1.35 2001/11/22 15:46:42 jhermann # Added module docstrings to all modules. # diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 8a15ad0..5ef6e2c 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -73,7 +73,7 @@ are calling the create() method to create a new node). If an auditor raises an exception, the original message is bounced back to the sender with the explanatory message given in the exception. -$Id: mailgw.py,v 1.36 2001-11-26 22:55:56 richard Exp $ +$Id: mailgw.py,v 1.37 2001-11-28 21:55:35 richard Exp $ ''' @@ -354,6 +354,10 @@ Subject was: "%s" username = self.db.user.get(author, 'username') self.db.close() self.db = self.instance.open(username) + + # re-get the class with the new database connection + cl = self.db.getclass(classname) + # now update the recipients list recipients = [] tracker_email = self.ISSUE_TRACKER_EMAIL.lower() @@ -590,6 +594,18 @@ def parseContent(content, blank_line=re.compile(r'[\r\n]+\s*[\r\n]+'), # # $Log: not supported by cvs2svn $ +# Revision 1.36 2001/11/26 22:55:56 richard +# Feature: +# . Added INSTANCE_NAME to configuration - used in web and email to identify +# the instance. +# . Added EMAIL_SIGNATURE_POSITION to indicate where to place the roundup +# signature info in e-mails. +# . Some more flexibility in the mail gateway and more error handling. +# . Login now takes you to the page you back to the were denied access to. +# +# Fixed: +# . Lots of bugs, thanks Roché and others on the devel mailing list! +# # Revision 1.35 2001/11/22 15:46:42 jhermann # Added module docstrings to all modules. #