[Zope3-dev] Security Proxy/isinstance

Dominik Huber dominik.huber at perse.ch
Fri Dec 2 09:15:48 EST 2005


Andres Freund wrote:

> Hi,
>
> I'm working with the combination of Zope3 and sqlobjet over sqlos and 
> discovered a problem (about SecurityProxy as i already asked about in 
> #zope3-dev).
>
> Some code in sqlobject is using isinstance() to decide what to do. The 
> problem is, that sometimes sqlobject gets securityProxied objects from 
> Zope, which theoretically is no problem. But in praxis it uses 
> isinstance and the SecurityProxy doesn't cooperate with that.
>
> Now i searched a bit in the web and discovered, that according to 
> this: 
> http://mail.python.org/pipermail/python-bugs-list/2003-February/016098.html 
> it should be possible to make the Proxies a bit more transparent.
>
> Did i understand that correctly? I dont understand to much about 
> python and especially about zope, but i think, that should be the way 
> to go, or am i mistaken?
>
> After a short look at _zope_proxy_proxy.c i think that this shouldn't 
> be too hard to implement (although i never touched the python c 
> bindings before, so it not unlikely that I'm mistaken).

You can use zapi.isinstance (zope.security.proxy orig. place). This 
function is useful because it works even if the instance is security 
proxied.

Regards,
Dominik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dominik.huber.vcf
Type: text/x-vcard
Size: 154 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20051202/e0241341/dominik.huber.vcf


More information about the Zope3-dev mailing list