zope.security.proxy¶
An introduction to proxies and their uses can be found in Untrusted Interpreters and Security Proxies.
See also
-
zope.security.proxy.getChecker(proxy)¶
-
zope.security.proxy.removeSecurityProxy(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
-
zope.security.proxy.Proxy¶ alias of
zope.security.proxy.ProxyPy
-
class
zope.security.proxy.ProxyPy(value, checker)[source]¶ Bases:
zope.proxy.PyProxyBaseThe pure-Python reference implementation of a security proxy.
This should normally not be created directly, instead use the
ProxyFactory().You can choose to use this implementation instead of the C implementation by default by setting the
PURE_PYTHONenvironment variable beforezope.securityis imported.