From: Kevin C. <ke...@us...> - 2006-03-27 15:51:52
|
Update of /cvsroot/mailmanager/MailManager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26869 Modified Files: CHANGES.txt MailManager.py Log Message: Applied fix for - Deleting an Account with tickets fails (#1459386) Noted changes for - RNG using too much entropy (#1459353) Index: CHANGES.txt =================================================================== RCS file: /cvsroot/mailmanager/MailManager/CHANGES.txt,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- CHANGES.txt 27 Mar 2006 12:54:33 -0000 1.74 +++ CHANGES.txt 27 Mar 2006 15:51:46 -0000 1.75 @@ -6,6 +6,8 @@ - TID in subject lines is now optional, based on database settings although no UI pages allow this to be configured * BUG FIXES +- Deleting an Account with tickets fails (#1459386) +- RNG using too much entropy (#1459353) - Direct cycles of support_of are not allowed now. (#1353210) - Fixed issue with non-ascii filter condition (#1438720) - Cite last includes only replies now (#1369571) Index: MailManager.py =================================================================== RCS file: /cvsroot/mailmanager/MailManager/MailManager.py,v retrieving revision 1.240 retrieving revision 1.241 diff -u -d -r1.240 -r1.241 --- MailManager.py 27 Mar 2006 13:26:09 -0000 1.240 +++ MailManager.py 27 Mar 2006 15:51:46 -0000 1.241 @@ -2018,7 +2018,7 @@ return self.AccountSettings(self, REQUEST, **acc) security.declareProtected('MailManager Settings', 'delAccount') - def delAccount(self, account_id, REQUEST): + def delAccount(self, account_id): """ Delete an account from the system. Check there are no tickets in it first. @@ -2029,12 +2029,22 @@ @affectstickets: no """ if self.sql.listTickets(sqv_account_id=account_id): - REQUEST.set('section', 'remove') - # REQUEST.set('error', - # 'You must delete the tickets from the Account first.') raise BadRequest, 'You must delete the tickets from the Account first.' else: self.sql.deleteAccount(sqv_email=account_id) + + security.declareProtected('MailManager Settings', 'http_delAccount') + def http_delAccount(self, account_id, REQUEST): + """ Delete an account from the system. + + Checks there are no tickets in it first + """ + try: + self.delAccount(account_id) + except BadRequest: + REQUEST.set('section', 'remove') + REQUEST.set('error', + 'You must delete the tickets from the Account first.') return self.AccountSettings(self, REQUEST) security.declarePublic('checkPOP3SSL') |