[Zope] You are not allowed to access ... in this context

martin f krafft madduck at madduck.net
Wed Oct 29 10:25:26 EST 2003


Hi,

I have a problem with a python script that has the Manager proxy
role. It creates a portal folder (Plone Folder) and then tries to
modify the newly created object. The ID is passed in the 'username'
parameter:

  portal = context.portal_url.getPortalObject()
  profiles = portal.profiles
  profiles.invokeFactory(id=username, type_name='Folder')

This works just fine and as expected. Now I wouldd like to modify
the folder, and am trying to get an object:

  profile = getattr(profiles, username)

But this fails:

  Unauthorized: You are not allowed to access <username> in this
  context

The script has the Manager proxy role, and I completely don't
understand why even without it, I should not be allowed to obtain
a reference to the folder.

I would appreciate any hints. Thanks,

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck
 
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
 
"a cigarette is the perfect type of pleasure.
 it is exquisite, and it leaves one unsatisfied."
                                                        -- oscar wilde
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.zope.org/pipermail/zope/attachments/20031029/a6030d24/attachment.bin


More information about the Zope mailing list