Am 09.04.2010, 12:06 Uhr, schrieb yuppie <y.2...@wcm-solutions.de>:
> getUnauthorizedURL is already using restrictedTraverse. This only fails
> because it starts from self instead of the parent (=portal root) and the
> login form is usually not registered for the cookie crumbler.
> And it tries to call absolute_url(). Views don't have that method.
Thanks for the explanation.
Adding a method to the view is easy enough:
return "%s/%s" % (self.utool(),
Although this exposes some of the drawbacks of the current implementation.
> An other approach would be to look up the URLs in the Actions tool. The
> login URL is already specified in the 'user/login' Action, an invisible
> logged_out Action could be added. Long time ago the cookie crumbler had
> a stand alone version, so there are no dependencies on other tools. But
> now I would prefer to avoid redundant settings.
Makes sense. I can see logging in and out as special cases of actions -
you shouldn't really be able to do without them. But they shouldn't be
hard-coded into CookieCrumbler.
Any idea why CookieCrumbler is a Folder?
Clark Consulting & Research
Zope-CMF maillist - Zope-CMF@zope.org
See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests