[Framework-Team] Re: Login redirect in 3.0?
rocky at serverzen.com
Wed Dec 27 14:59:18 UTC 2006
On Wed, 2006-27-12 at 15:54 +0100, Martin Aspeli wrote:
> Sidnei da Silva wrote:
> > On 12/27/06, Martin Aspeli <optilude at gmx.net> wrote:
> >> We could make a nicer implementation, by having a view with name @@login
> >> registered for the portal root. /login (or /@@login, to disambiguate)
> >> would then only be available on the site root. I suggest we still
> >> redirect to /login_form e.g. with
> >> self.request.response.redirect('login_form').
> >> I can whip this up if people agree.
> > The portal root is not guaranteed to be the site root. It's common
> > practice to serve a sub folder of the portal root as the site root.
> D'oh! Good point! Mmm, then we can register for "*". We could also
> register for INavigationRoot, though it's not necessarily guaranteed
> that this is the actual virtual host root either.
> Well, we can register for "*". IIRC, views don't shadow attributes or
> other things normally (that's why you can disambiguate with @@ if needed).
In Zope 2.10 (and some earlier versions of Five) the only thing that
views "overshadow" are acquired attributes which should make this all
"*" would be the way to go imho.
We should probably make 'login' a new "reserved" id though so people
don't create content with the name 'login'. This way /login would
always do as designed and we wouldn't have to worry about instructing
people to do /@@login. The only remaining danger is if someone creates
their own content classes with a login attribute.
ServerZen Software -- http://www.serverzen.com
News About The Server (blog) -- http://www.serverzen.net
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the Framework-Team