[Zope] Weird permissions problem.

Phil Harris phil.harris@zope.co.uk
Wed, 18 Apr 2001 15:59:56 +0100


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.