I have a problem which I'm struggling to even put it into words, but here goes. I got a new CVS version of Zope this morning. Compiled on Linux (RedHat 6.0) no problems there. Logged in as the admin user and created a new Manager. Closed browser, logged in as Manager. Put a SiteRoot in, works fine (done all this hundreds of times before) Change the index_html so it looks like this: <dtml-var standard_html_header> <a href="&dtml.url-login_html;">Login</a> </dtml-var standard_html_footer> Created the login_html (dtml_method). Changed the permissions so that anaonymous couldn't view it. Tried viewing the index_html, which to my mind should have worked but it didn't. I got a traceback: Site Error An error was encountered while publishing this resource. KeyError Sorry, a site error occurred. Traceback (innermost last): File /usr/local/trial/Zope2/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /usr/local/trial/Zope2/lib/python/ZPublisher/Publish.py, line 187, in publish File /usr/local/trial/Zope2/lib/python/Zope/__init__.py, line 221, in zpublisher_exception_hook (Object: ApplicationDefaultPermissions) File /usr/local/trial/Zope2/lib/python/ZPublisher/Publish.py, line 171, in publish File /usr/local/trial/Zope2/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: index_html) File /usr/local/trial/Zope2/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: index_html) File /usr/local/trial/Zope2/lib/python/OFS/DTMLMethod.py, line 193, in __call__ (Object: index_html) File /usr/local/trial/Zope2/lib/python/DocumentTemplate/DT_String.py, line 538, in __call__ (Object: index_html) File /usr/local/trial/Zope2/lib/python/OFS/DTMLMethod.py, line 186, in __call__ (Object: standard_html_header) File /usr/local/trial/Zope2/lib/python/DocumentTemplate/DT_String.py, line 538, in __call__ (Object: standard_html_header) File /usr/local/trial/Zope2/lib/python/DocumentTemplate/DT_Var.py, line 276, in render (Object: login_html) KeyError: login_html Now maybe I'm wrong but shouldn't you be able to get the url of a page even if you turn off view permissions? Someone please help, I'm getting slightly confused here.
thinking about the logic of the steps here: a user comes to your url, and must log in, but if log in will not view until the user is authenticated, then the user never has an opportunity to log in and become authenticated. it seems to me that the login page has to be viewable by anonymous in order to allow anonymous_user to become authenticated_user. everything after the log in would need to have anonymous viewing turned off. or am i missing something here? ciao! greg. Gregory Haley DBA/Web Programmer Venaca, LLC.
Now maybe I'm wrong but shouldn't you be able to get the url of a page even if you turn off view permissions?
Someone please help, I'm getting slightly confused here.
The login page doesn't have to be viewable. The fact that it isn't viewable triggers the login dialog. Thereby logging the user in. This used to work, sometime back, I've noticed a few things like this recently but since at the time I was using the LoginManager for auth, I thought it was me doing something wrong. Now I'm not so sure. In fact I'm not sure of much at the moment, I'm losing my Zen slowly but surely. Probably a bit of Mad-CowDisease since I'm in UK 8^(. The question remains, should you be able to get the absolute_url of an object if the object itself isn't viewable? TIA Phil ----- Original Message ----- From: <ghaley@mail.venaca.com> To: "Phil Harris" <phil.harris@zope.co.uk> Cc: <zope@zope.org> Sent: Wednesday, April 18, 2001 4:15 PM Subject: Re: [Zope] Weird permissions problem.
thinking about the logic of the steps here:
a user comes to your url, and must log in, but if log in will not view until the user is authenticated, then the user never has an opportunity to log in and become authenticated.
it seems to me that the login page has to be viewable by anonymous in order to allow anonymous_user to become authenticated_user. everything after the log in would need to have anonymous viewing turned off.
or am i missing something here?
ciao! greg.
Gregory Haley DBA/Web Programmer Venaca, LLC.
Now maybe I'm wrong but shouldn't you be able to get the url of a page
even
if you turn off view permissions?
Someone please help, I'm getting slightly confused here.
Phil Harris wrote:
I have a problem which I'm struggling to even put it into words, but here goes.
I got a new CVS version of Zope this morning.
Compiled on Linux (RedHat 6.0) no problems there.
Logged in as the admin user and created a new Manager.
Closed browser, logged in as Manager.
Put a SiteRoot in, works fine (done all this hundreds of times before)
Change the index_html so it looks like this:
<dtml-var standard_html_header> <a href="&dtml.url-login_html;">Login</a> </dtml-var standard_html_footer>
<stab stab, it sure is dark in here> Phil, what happens if you use this syntax? <a href="<dtml-var absolute_url>/login_html">Login</a> I'm "guessing" that the entity syntax is trying to resolve the complete url with login_html. If you use the above, it will(?) resolve the current url and 'tag' the login_html on the end for rendering. -- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (731) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
Tim, I also tried that earlier and it asks for authentication for the absolute_url bit. Phil ----- Original Message ----- From: "Tim Cook" <twcook@iswt.com> To: "Phil Harris" <phil.harris@zope.co.uk> Cc: <zope@zope.org> Sent: Wednesday, April 18, 2001 4:38 PM Subject: Re: [Zope] Weird permissions problem.
<stab stab, it sure is dark in here> Phil, what happens if you use this syntax?
<a href="<dtml-var absolute_url>/login_html">Login</a>
I'm "guessing" that the entity syntax is trying to resolve the complete url with login_html. If you use the above, it will(?) resolve the current url and 'tag' the login_html on the end for rendering.
-- Tim Cook, President - FreePM,Inc. http://www.FreePM.com Office: (731) 884-4126 ONLINE DEMO: http://www.freepm.org:8080/FreePM
participants (3)
-
ghaley@mail.venaca.com -
Phil Harris -
Tim Cook