[Zope-CMF] More browser views

Charlie Clark charlie.clark at clark-consulting.eu
Fri Apr 9 07:29:43 EDT 2010


Am 09.04.2010, 12:06 Uhr, schrieb yuppie <y.2010 at 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:

     def absolute_url(self):
         return "%s/%s" % (self.utool(),
                           self.context.auto_login_page)

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?

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


More information about the Zope-CMF mailing list