[PEAK] peak.web bug - permission check for resource fails
wayne at larsen.st
wayne at larsen.st
Mon Feb 9 19:45:00 EST 2004
When adding an error template to the resources directory, I encountered
the following exception. It looks like permission.of expects a type,
where it is getting an instance. I maybe should not use the word bug, as
it very well be something I'm doing wrong.
Thanks,
Wayne
Exception happened during processing of request from ('127.0.0.1', 3104)
Traceback (most recent call last):
File "c:\Python23\lib\SocketServer.py", line 222, in handle_request
self.process_request(request, client_address)
File "c:\Python23\lib\SocketServer.py", line 241, in process_request
self.finish_request(request, client_address)
File "c:\Python23\lib\SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\Python23\lib\SocketServer.py", line 521, in __init__
self.handle()
File "c:\Python23\Lib\site-packages\peak\util\WSGIServer.py", line 135,
in handle
self.server.get_service().runCGI(self.rfile,stdout,stderr,env)
File "c:\Python23\Lib\site-packages\peak\web\publish.py", line 389, in
runCGI
return self.publish(request) or 0
File
"d:\src\python\Zope3.cvs\build\lib.win32-2.3\zope\publisher\publish.py",
line 146, in publish
publication.handleException(
File "c:\Python23\Lib\site-packages\peak\web\publish.py", line 214, in
handleException
return handler.handleException(
File "c:\Python23\Lib\site-packages\peak\web\errors.py", line 60, in
handleException
result = ctx.contextFor('template').render()
File "c:\Python23\lib\site-packages\peak\web\places.py", line 95, in
contextFor
ob = self.traversable.traverseTo(name, self)
File "c:\Python23\lib\site-packages\peak\web\places.py", line 248, in
traverseTo
return super(Decorator,self).traverseTo(name, ctx)
File "c:\Python23\lib\site-packages\peak\web\places.py", line 186, in
traverseTo
result = interaction.allows(ob, name)
File "c:\Python23\Lib\site-packages\peak\security\permission.py", line
279, in allows
attempt = self.accessType(permissionNeeded, subject, name, user, self)
File "c:\Python23\Lib\site-packages\peak\security\permission.py", line
183, in __init__
self.permission = permission.of(klass)
File "c:\Python23\Lib\site-packages\peak\security\permission.py", line
305, in of
return self.__cache[protectedObjectType]
File "c:\Python23\lib\weakref.py", line 170, in __getitem__
return self.data[ref(key)]
TypeError: cannot create weak reference to 'classobj' object
----------------------------------------
More information about the PEAK
mailing list