Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(2)  |  Derive(0)  |  Import(3)

        def guarded_apply(func, *args, **kws):
    return builtin_guarded_apply(func, args, kws)
        


src/c/o/collective.templateengines-0.3.5/collective/templateengines/context/jinjazope.py   collective.templateengines(Download)
            raise SecurityError('%r is not safely callable' % (__obj,))
 
        return ZopeGuards.guarded_apply(__obj, *args, **kwargs)
 
 

src/f/i/five.pt-2.2.2/src/five/pt/expressions.py   five.pt(Download)
from AccessControl.ZopeGuards import guarded_getattr
from AccessControl.ZopeGuards import guarded_getitem
from AccessControl.ZopeGuards import guarded_apply
from AccessControl.ZopeGuards import guarded_iter
from AccessControl.ZopeGuards import protected_inplacevar

src/e/r/erp5-HEAD/product/ERP5Type/tests/testTimerService.py   erp5(Download)
from AccessControl.SecurityManagement import newSecurityManager, \
                                             noSecurityManager
from AccessControl.ZopeGuards import guarded_apply, guarded_getattr
from zExceptions import Unauthorized
 
    process_timer = guarded_getattr(timer_service, 'process_timer')
    try:
        guarded_apply(process_timer, (0,))
    except Unauthorized:
        self.fail('calling process_timer is unauthorized')

src/a/c/AccessControl-3.0.8/src/AccessControl/tests/testZopeGuards.py   AccessControl(Download)
    def test_apply(self):
        from AccessControl import Unauthorized
        from AccessControl.ZopeGuards import guarded_apply
        sm = SecurityManager(1) # rejects
        old = self.setSecurityManager(sm)