Re: [Zope-CMF] CMF Tests: 3 OK, 2 Failed
Hi Charlie! Charlie Clark wrote: > Am 15.04.2010, 15:03 Uhr, schrieb yuppie: >> UniqueObject is derived from ImmutableId. I think you have to set this >> for the class: >> id = 'cookie_authentication' > > Okay, makes sense if the tests are patched accordingly. Need to check what > was causing your new doctest to fail. I doubt you need to understand the failure and patch the tests for this. With the id on class level they should work as before. And please don't forget to remove the _create_forms code as well if CookieCrumbler is no longer a Folder. > I'll pick this up when I've made CookieCrumbler able to handle views. The > plan on this is > > 1) Proper interface for CookieCrumbler > > 2) Use actions for login/logout That also means you have to change the profile and add an upgrade step. > 3) Announce the deprecation (from CMF 2.4?) of the login/logout properties > as these will be replaced by action lookups. Is there any point in > maintaining the other properties as variables? After spending hours trying to understand the exception handling in Zope, I think the unauth redirect code should be completely removed from CookieCrumbler. An exception view seems to be a much more appropriate solution. I'll write a prototype and report back. Cheers, Yuppie ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] CMF Tests: 3 OK, 2 Failed
Am 19.04.2010, 09:19 Uhr, schrieb yuppie : > I doubt you need to understand the failure and patch the tests for this. > With the id on class level they should work as before. You're right. Only the import/export tests needed updating as they used another id. > And please don't forget to remove the _create_forms code as well if > CookieCrumbler is no longer a Folder. Thanks for that. Changes now committed to trunk. >> I'll pick this up when I've made CookieCrumbler able to handle views. >> The >> plan on this is >> >> 1) Proper interface for CookieCrumbler >> >> 2) Use actions for login/logout > That also means you have to change the profile and add an upgrade step. For the profile I assume you mean cookieauth.xml ? login/logout actions are already defined. Having never previously written an upgrade step I'm a little unclear as to how to go about this. >> 3) Announce the deprecation (from CMF 2.4?) of the login/logout >> properties >> as these will be replaced by action lookups. Is there any point in >> maintaining the other properties as variables? > After spending hours trying to understand the exception handling in > Zope, I think the unauth redirect code should be completely removed from > CookieCrumbler. An exception view seems to be a much more appropriate > solution. I'll write a prototype and report back. From what I read of your posts on zope-dev this sounds reasonable. How would this affect CookieCrumbler? Get rid of the unauthorized and _unauthorized methods? There's probably not going to be much of CookieCrumbler left at the end of this. Although that might not be such a bad thing! Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
[Zope-CMF] CMF Tests: 5 OK
Summary of messages to the cmf-tests list. Period Sun Apr 18 12:00:00 2010 UTC to Mon Apr 19 12:00:00 2010 UTC. There were 5 messages: 5 from CMF Tests. Tests passed OK --- Subject: OK : CMF-2.1 Zope-2.10 Python-2.4.6 : Linux From: CMF Tests Date: Sun Apr 18 21:46:16 EDT 2010 URL: http://mail.zope.org/pipermail/cmf-tests/2010-April/012875.html Subject: OK : CMF-2.1 Zope-2.11 Python-2.4.6 : Linux From: CMF Tests Date: Sun Apr 18 21:48:16 EDT 2010 URL: http://mail.zope.org/pipermail/cmf-tests/2010-April/012876.html Subject: OK : CMF-2.2 Zope-2.12 Python-2.6.4 : Linux From: CMF Tests Date: Sun Apr 18 21:50:16 EDT 2010 URL: http://mail.zope.org/pipermail/cmf-tests/2010-April/012877.html Subject: OK : CMF-trunk Zope-2.12 Python-2.6.4 : Linux From: CMF Tests Date: Sun Apr 18 21:52:16 EDT 2010 URL: http://mail.zope.org/pipermail/cmf-tests/2010-April/012878.html Subject: OK : CMF-trunk Zope-trunk Python-2.6.4 : Linux From: CMF Tests Date: Sun Apr 18 21:54:16 EDT 2010 URL: http://mail.zope.org/pipermail/cmf-tests/2010-April/012879.html ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
[Zope-CMF] getActionObject() deprecated?
Hi, this may just be another case of me being thick but whilst working on CookieCrumler I took a look at the best way for getting the "user/login" and "user/logout" actions. getActionObject("user/login") would seem to be best approach. However, it will not work with any straight actions as none of them have a category. As things stand this method will only work with Type actions. Is this correct? Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] getActionObject() deprecated?
Hi! Charlie Clark wrote: > this may just be another case of me being thick but whilst working on > CookieCrumler I took a look at the best way for getting the "user/login" > and "user/logout" actions. getActionObject("user/login") would seem to be > best approach. However, it will not work with any straight actions as none > of them have a category. As things stand this method will only work with > Type actions. Is this correct? Yes. You don't need that method for newstyle Actions. Just use this if you want to get the Action object: atool.user.login But you don't need the Action itself. You need the ActionInfo object. Use this to get the login url: target = atool.getActionInfo('user/login')['url'] And please don't forget that I plan to replace the unauth redirect code completely. Cheers, Yuppie ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] getActionObject() deprecated?
Am 19.04.2010, 15:35 Uhr, schrieb yuppie : Hiya Yuppie, > Yes. You don't need that method for newstyle Actions. Just use this if > you want to get the Action object: > atool.user.login hm, direct access by attributes, who'd have thunk it!? ;-) > But you don't need the Action itself. You need the ActionInfo object. > Use this to get the login url: > target = atool.getActionInfo('user/login')['url'] So, it was me being thick...(I plead hayfever). I got confused looking at the various layers of ActionProviders, ActionCategories and ActionTools! > And please don't forget that I plan to replace the unauth redirect code > completely. I haven't forgotten that. Login and Logout are definitely better definitely done as views as they depend upon working with the Request object. Maybe you could edit the CookieCrumbler interface so I don't waste more time on stuff that's being replaced anyway? Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] CMF Tests: 3 OK, 2 Failed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 yuppie wrote: > After spending hours trying to understand the exception handling in > Zope, I think the unauth redirect code should be completely removed from > CookieCrumbler. An exception view seems to be a much more appropriate > solution. I'll write a prototype and report back. I think you are correct: registering appropriate exception views is the only sane way out of that jungle. The CookieCrumbler should get out of the "challenge" business altogether. Note that CC is largely useless already in any environment which uses a non-default user folder at the root: all the user folders written in the past decade already cope with this problem better than CC. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkvMg9MACgkQ+gerLs4ltQ55sQCglKKJpFwt64NlceJN2gT2JRQF ttMAnA+OE/GKqt/MKLWyZRrHwWJ5X3f6 =QdBp -END PGP SIGNATURE- ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
Re: [Zope-CMF] getActionObject() deprecated?
Am 19.04.2010, 15:35 Uhr, schrieb yuppie : > And please don't forget that I plan to replace the unauth redirect code > completely. I've been working on a "getLoginURL()" method to be able to handle login/logout actions as well as the current behaviour but I don't seem to be able to write any usable tests as the methods depend on "getToolByName" which works fine for the root object as long as the tools are registered but not for the CookieCrumbler itself. I just get an AttibuteError for whichever tool: "portal_url", "portal_actions", etc. Is it wrong to test like this? Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Zope-CMF maillist - Zope-CMF@zope.org https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests