From: Andrew V. <av...@us...> - 2005-05-19 17:06:02
|
Update of /cvsroot/mailmanager/mailmanager In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv835 Modified Files: Tag: RELENG_2_0 MailManager.py migration.py Log Message: Fixed bug 1204811 so logging back in from the logout page now works. In the process I shifted the Login.zpt and LoggedOut.zpt forms out of the CookieCrumbler (ZODB) and onto the filesystem. MailManager alpha 1 users will need to re-migrate or alternatively create a new MM instance in order to see the fix. Index: MailManager.py =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/MailManager.py,v retrieving revision 1.148.2.4 retrieving revision 1.148.2.5 diff -u -d -r1.148.2.4 -r1.148.2.5 --- MailManager.py 18 May 2005 14:08:59 -0000 1.148.2.4 +++ MailManager.py 19 May 2005 17:05:51 -0000 1.148.2.5 @@ -240,8 +240,6 @@ manage_addCC(self, 'Cookie') self.Cookie.auto_login_page = 'Login' self.Cookie.logout_page = 'LoggedOut' - self.addZPT(self.Cookie, 'Login') - self.addZPT(self.Cookie, 'LoggedOut') # Add the images. manage_addDirectoryView(self, os.path.join('MailManager', @@ -267,13 +265,6 @@ self.version = self.Control_Panel.Products['MailManager'].version return - security.declarePrivate('addZPT') - def addZPT(self, obj, id): - """Add a Zope Page Template to an object manager.""" - f=open(os.path.join(package_home(globals()),'www','%s.zpt' % id), 'rb') - manage_addPageTemplate(obj, id, '', text=f.read()) - f.close() - security.declarePublic('getSchemaName') # since I want it from a DTML method def getSchemaName(self): return self.schema.rstrip('.') @@ -1905,6 +1896,13 @@ security.declarePublic('test') test = PageTemplateFile('www/Test', globals()) + # CookieCrumbler login/logout forms. + security.declarePublic('LoggedOut') + LoggedOut = PageTemplateFile('www/LoggedOut', globals()) + + security.declarePublic('Login') + Login = PageTemplateFile('www/Login', globals()) + # The two remaining DTML files. security.declarePublic('master_style_css') master_style_css = DTMLFile('www/master_style_css', globals()) Index: migration.py =================================================================== RCS file: /cvsroot/mailmanager/mailmanager/migration.py,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -d -r1.2 -r1.2.2.1 --- migration.py 5 May 2005 12:26:40 -0000 1.2 +++ migration.py 19 May 2005 17:05:52 -0000 1.2.2.1 @@ -64,12 +64,12 @@ if not 'attachments' in self.objectIds(): self.manage_addFolder(id='attachments', title='Standard Attachments') - # Update login page - self.Cookie.manage_delObjects('Login') - self.addZPT(self.Cookie, 'Login') # Now upgraded to version 1.1 + # We no longer keep the login/logout pages in the ZODB + self.Cookie.manage_delObjects(['Login', 'LoggedOut']) + # Add the sql methods manage_addDirectoryView(self, os.path.join('MailManager', 'sql')) self.addZSQLMethods() |