[Zope-CMF] getActionObject() deprecated?

yuppie y.2010 at wcm-solutions.de
Mon Apr 19 09:35:03 EDT 2010


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




More information about the Zope-CMF mailing list