o ,ò¿W)ã@s¶dZddlmZddlmZddlmZddlmZddlmZddlm Z ddl m Z dd l m Z dd l m Z dd lmZd ZGd d„deƒZdd„Zddd„Zdd„Zdd„ZdS)z5zope.security support for the configuration handlers é)Ú providedBy)Ú ProxyBase)ÚgetProxiedObject)ÚLocatingTrustedAdapterFactory)ÚLocatingUntrustedAdapterFactory)ÚTrustedAdapterFactory)ÚChecker)Ú CheckerPublic)ÚInterfaceChecker)ÚProxyz zope.Publicc@s eZdZdZdd„ZeeƒZdS)ÚPermissionProxy)Ú__Security_checker__cCs tt|ƒƒS©N)rr)Úself©rú9/usr/lib/python3/dist-packages/zope/component/security.pyÚ__providedBy__"s zPermissionProxy.__providedBy__N)Ú__name__Ú __module__Ú __qualname__Ú __slots__rÚpropertyrrrrr s r cCsh|s|sdg}|tkr t}i}|r|D]}|||<q|r.|D]}|jddD]}|||<q&qt|ƒ}|S)NÚ__call__T)Úall)ÚPublicPermissionr Únamesr)Ú_contextÚ permissionÚallowed_interfaceÚallowed_attributesÚrequireÚnameÚiÚcheckerrrrÚ_checker&s  ÿr$NcCsH|dur|dus |durtdƒ‚|tkrt}t||ƒ}t|ƒ}||_|S)zˆTry to get the object proxied with the `checker`, but not too soon We really don't want to proxy the object unless we need to. Nz.factory)rr r r-)r,r'rr-rr+rÚprotectedFactoryJs  r.cCsD|tkrt}|s|dur|tur|rt|ƒSt|ƒS|r t|ƒS|Sr)rr rrr)r-rÚlocateÚtrustedrrrÚsecurityAdapterFactoryYsr1)NNN)Ú__doc__Úzope.interfacerÚ zope.proxyrrÚzope.security.adapterrrrÚzope.security.checkerrr r Úzope.security.proxyr rr r$r(r.r1rrrrÚs"