zope.security.proxy
¶
-
zope.security.proxy.
getTestProxyItems
(proxy)[source]¶ Return a sorted sequence of checker names and permissions for testing
-
zope.security.proxy.
isinstance
(object, cls)[source]¶ Test whether an object is an instance of a type.
This works even if the object is security proxied:
>>> from zope.security.proxy import isinstance
>>> class C1(object):
... pass
>>> c = C1()
>>> isinstance(c, C1)
True
>>> from zope.security.checker import ProxyFactory
>>> isinstance(ProxyFactory(c), C1)
True
>>> class C2(C1):
... pass
>>> c = C2()
>>> isinstance(c, C1)
True
>>> from zope.security.checker import ProxyFactory
>>> isinstance(ProxyFactory(c), C1)
True