|
|
except: Unauthorized doesn't trap Unauthorized exception / Christoph Berendes <berendes@netalyst.com>
except: Unauthorized doesn't trap Unauthorized exception
Christoph Berendes <berendes(at)netalyst.com> |
2005-09-20 09:04:47 |
[
FULL ]
|
I'm running into a permissions puzzle, or perhaps zope bug.
I've got some code that generates breadcrumbs, working upward from an
object into folders where my users may not have permissions. I expect to
get Unauthorized exceptions, and trap them, but the exceptions generated
aren't trapped by "except: Unauthorized". However, when I print the
traceback manually, it seems it is in fact an Unauthorized error. (And a
user with a Manager role gets no errors, so it is ultimately a
permissions issue.)
the code:
[...]
generates this in the log
[...]
but if I attempt to trap it with "except: Unauthorized", the
Unauthorized error pops through to the browser, with nothing generated
in the event.log.
|
Re: [ZPUGDC] except: Unauthorized doesn't trap Unauthorized exception / Matthew T.Kromer <MATTHEW.T.KROMER@saic.com>
Re: [ZPUGDC] except: Unauthorized doesn't trap Unauthorized exception
Matthew T.Kromer <MATTHEW.T.KROMER(at)saic.com> |
2005-09-20 09:15:32 |
[
FULL ]
|
You're resolving breadcrumbs in a fairly unusual way by using
resolve_url. Normally, one figures out breadcrumbs "backwards" from
the current context by reaching up the aq_parent chain (with, perhaps,
some inspection to see if the parent object sets the property
is_principia_folderish).
You might want to examine the Plone script "breadcrumbs.py" for some
hints; it will be in CMFPlone/skins/plone_scripts/breadcrumbs.py
On Sep 20, 2005, at 10:10 AM, Christoph Berendes wrote:
[...][...][...][...][...]
|
|