[Zope3-Users] How to access object generated by outer library in a view

yokan yokan_geo at yahoo.co.jp
Wed Jan 9 09:21:00 EST 2008


Thank you Albertas  and I am sorry for my late reply.

zope.security.proxy.removeSecurityProxy approach worked fine in my case.

This was a great help for me.


On 2007/12/28, at 21:53, Albertas Agejevas wrote:

> On Thu, Dec 27, 2007 at 12:13:40PM +0900, Yosuke Kawasaki wrote:
>> I am a newbie in zope3.
>> I am trying to make a view which shows the result of BLAST
>> sequence aligner using Biopython.
>> When I access the raw data object (generator object) which
>> Bio.NCBIXML returned,
>> zope raises ForbiddenAttribute Error.
>>
>> I think I can workaround this by transferring all data
>> into some list or dictionary before passing it
>> to view object. But It would be nice if I can access the
>> structure in view because the object is rather big and
>> complex.
>>
>> I have no idea to declare permission to this kind of
>> object (generated by outer library).
>> Please tell me what is the best way to deal with this
>> situation.
>
> There are two options.  Either (in your ZCML) you define the
> permissions for the relevant classes in the library you're using, or
> you can use zope.security.proxy.removeSecurityProxy on your generator
> to unwrap it.
>
> Albertas

--------------------------------------
Easy + Joy + Powerful = Yahoo! Bookmarks x Toolbar
http://pr.mail.yahoo.co.jp/toolbar/


More information about the Zope3-users mailing list