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

All Samples(15)  |  Call(7)  |  Derive(0)  |  Import(8)

src/a/c/AccessControl-3.0.8/src/AccessControl/Implementation.py   AccessControl(Download)
 
    from AccessControl.SecurityManager import setSecurityPolicy
    policy = impl.ZopeSecurityPolicy(True, True)
    setSecurityPolicy(policy)
 

src/a/c/AccessControl-3.0.8/src/AccessControl/ImplC.py   AccessControl(Download)
 
from AccessControl.ImplPython import SecurityManager
from AccessControl.ImplPython import ZopeSecurityPolicy
 
 

src/e/n/enpraxis.educommons-4.1.2/enpraxis/educommons/tests/test_view_permissions.py   enpraxis.educommons(Download)
from AccessControl import ZopeGuards
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from AccessControl.ImplPython import ZopeSecurityPolicy
from AccessControl import Unauthorized
 
        self.membership = self.portal.portal_membership
 
        setSecurityPolicy(ZopeSecurityPolicy(verbose=True))
 
        # We need to manually register the roles from the rolemap with

src/e/n/enpraxis.educommons-4.1.2/enpraxis/educommons/tests/test_object_workflow.py   enpraxis.educommons(Download)
from AccessControl import ZopeGuards
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from AccessControl.ImplPython import ZopeSecurityPolicy
from AccessControl import Unauthorized
 
        self.membership = self.portal.portal_membership
 
        setSecurityPolicy(ZopeSecurityPolicy(verbose=True))
 
        # We need to manually register the roles from the rolemap with

src/e/n/enpraxis.educommons-4.1.2/enpraxis/educommons/tests/test_object_remove.py   enpraxis.educommons(Download)
from AccessControl import ZopeGuards
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from AccessControl.ImplPython import ZopeSecurityPolicy
from AccessControl import Unauthorized
 
        self.membership = self.portal.portal_membership
 
        setSecurityPolicy(ZopeSecurityPolicy(verbose=True))
 
        # We need to manually register the roles from the rolemap with

src/e/n/enpraxis.educommons-4.1.2/enpraxis/educommons/tests/test_object_edit.py   enpraxis.educommons(Download)
from AccessControl import ZopeGuards
from AccessControl.ZopeGuards import guarded_getattr, get_safe_globals
from AccessControl.ImplPython import ZopeSecurityPolicy
from AccessControl import Unauthorized
 
        self.membership = self.portal.portal_membership
 
        setSecurityPolicy(ZopeSecurityPolicy(verbose=True))
 
        # We need to manually register the roles from the rolemap with

src/c/o/collective.timedevents-0.3/collective/timedevents/tests.py   collective.timedevents(Download)
from zope.app.testing import placelesssetup
from Products.Five import fiveconfigure
from AccessControl.ImplPython import ZopeSecurityPolicy
from AccessControl.SecurityManager import setSecurityPolicy
 
    def afterSetUp(self):
        # Set verbose security policy, making debugging Unauthorized
        # exceptions great deal easier in unit tests
        setSecurityPolicy(ZopeSecurityPolicy(verbose=True))
 

src/a/c/AccessControl-3.0.8/src/AccessControl/tests/testZopeSecurityPolicy.py   AccessControl(Download)
    def _getTargetClass(self):
        from AccessControl.ImplPython import ZopeSecurityPolicy
        return ZopeSecurityPolicy
 
class C_ZSPTests(ZopeSecurityPolicyTestBase,

src/p/r/Products.CMFCore-2.2.8/Products/CMFCore/tests/test_utils.py   Products.CMFCore(Download)
    def test__checkPermission(self):
        from AccessControl import getSecurityManager
        from AccessControl.ImplPython import ZopeSecurityPolicy
        from AccessControl.Permission import Permission
        from AccessControl.SecurityManagement import newSecurityManager
        from AccessControl.SecurityManager import setSecurityPolicy
        from Products.CMFCore.utils import _checkPermission
 
        setSecurityPolicy(ZopeSecurityPolicy())