Verbosesecurity: "your user account is defined outside the context of the object accessed"
Inside a ZPT I am calling "python here.getTranscript().getEntry(1).getTimestamp()". All subobjects are derived from Persistent and Implicit and are setup for public access (declareObjectPublic()). The getTimestamp() method is protected by the 'View' permission. When the ZPT is called then Unauthorized is raised: Exception Value Your user account is defined outside the context of the object being accessed. Access to 'getTimestamp' of (TranscriptEntry instance at 933db28) denied. Your user account, admin, exists at /acl_users. Access requires one of the following roles: ['Manager']. The account 'admin' is definited in /acl_users and has the Manager role and the View permission is granted to all roles....very weird. Any ideas? Andreas
This usually indicates a wrapping problem; does getTranscript or getEntry create an object on the fly and forget to do return obj.__of__(self) ? Brian Lloyd brian@zope.com V.P. Engineering 540.361.1716 Zope Corporation http://www.zope.com
-----Original Message----- From: zope-bounces@zope.org [mailto:zope-bounces@zope.org]On Behalf Of Andreas Jung Sent: Wednesday, September 10, 2003 8:33 AM To: zope@zope.org Subject: [Zope] Verbosesecurity: "your user account is defined outside the context of the object accessed"
Inside a ZPT I am calling "python here.getTranscript().getEntry(1).getTimestamp()". All subobjects are derived from Persistent and Implicit and are setup for public access (declareObjectPublic()). The getTimestamp() method is protected by the 'View' permission.
When the ZPT is called then Unauthorized is raised:
Exception Value Your user account is defined outside the context of the object being accessed. Access to 'getTimestamp' of (TranscriptEntry instance at 933db28) denied. Your user account, admin, exists at /acl_users. Access requires one of the following roles: ['Manager'].
The account 'admin' is definited in /acl_users and has the Manager role and the View permission is granted to all roles....very weird.
Any ideas?
Andreas
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
The problem had to do with __of__() but after checking and fixing all wrapper I ran into other problems...anyway I kicked the code and wrote it from scratch. Andreas --On Mittwoch, 10. September 2003 10:38 Uhr -0400 Brian Lloyd <brian@zope.com> wrote:
This usually indicates a wrapping problem; does getTranscript or getEntry create an object on the fly and forget to do return obj.__of__(self) ?
participants (2)
-
Andreas Jung -
Brian Lloyd