[Zope3-Users] Unauthorized object not the same
Simon Elbaz
elbazsimon9 at gmail.com
Mon Jun 15 12:02:00 EDT 2009
Hi,
I have added :
<include package="zope.app.exception.browser" /> in the file
browser/configure.zcml and the result is the same.
I have identified the function that makes the difference, it is:
>
/home/simon/.buildout/eggs/zope.interface-3.5.1-py2.5-linux-i686.egg/zope/interface/adapter.py(478)queryMultiAdapter()
-> factory = self.lookup(map(providedBy, objects), provided, name)
where
(Pdb) print objects
(Unauthorized(<zope.app.publisher.browser.viewmeta.SearchAddForm object at
0x9b503cc>, 'browserDefault', 'zope.View'),
<zope.publisher.browser.BrowserRequest instance URL=
http://localhost:9030/++skin++Login/@@search.html>)
(Pdb) print provided
<InterfaceClass zope.interface.Interface>
(Pdb) print name
index.html
I am a little bit stuck ...
Regards
Simon
On Sun, Jun 14, 2009 at 1:27 AM, Simon Elbaz <elbazsimon9 at gmail.com> wrote:
> Hi,
> I am trying to set a SessionCredentialsPlugin in a application.
>
> When I try to access the following URL
> http://localhost:9030/++skin++Login/@@search.html, the result of the call:
> >
> /home/simon/.buildout/eggs/zope.app.publication-3.7.0-py2.5.egg/zope/app/publication/zopepublication.py(322)handleException()
> -> view = zope.component.queryMultiAdapter(
> (exception, request), name=name)
> (Pdb) print view.__init__
> <bound method Unauthorized.__init__ of <*zope.app.http.exception.unauthorized.Unauthorized
> *object at 0x97faa6c>>
>
> where exception=(<zope.app.publisher.browser.viewmeta.Contents object at
> 0x89ad5ec>, 'browserDefault', 'zope.View')
>
>
> When I try to access the following URL http://localhost:9030/, the result
> of the call:
> >
> /home/simon/.buildout/eggs/zope.app.publication-3.7.0-py2.5.egg/zope/app/publication/zopepublication.py(322)handleException()
> -> view = zope.component.queryMultiAdapter((exception, request), name=name)
> (Pdb) print view.__init__
> <bound method Unauthorized.__init__ of <*
> zope.app.publisher.browser.viewmeta.Unauthorized* object at 0x8badd6c>>
>
> where exception is (<zope.app.publisher.browser.viewmeta.SearchAddForm
> object at 0x89ad3ec>, 'browserDefault', 'cdcadama.View').
>
> Could someone explain me why the result is different ?
>
> Thanks
> Simon
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20090615/c4834846/attachment.html
More information about the Zope3-users
mailing list