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

All Samples(271)  |  Call(158)  |  Derive(0)  |  Import(113)
install *manager* as current security manager for this thread.

        def setSecurityManager(manager):
    """install *manager* as current security manager for this thread."""
    thread_id=get_ident()
    _managers[thread_id]=manager
        


src/c/o/collective.pfg.dexterity-0.9.0/src/collective/pfg/dexterity/adapter.py   collective.pfg.dexterity(Download)
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl import ClassSecurityInfo
from AccessControl.interfaces import IOwned
        finally:
            # Note that finally is also called before return
            setSecurityManager(old_security_manager)
    return wrapper
 

src/h/e/hexagonit.socialbutton-0.10.2/src/hexagonit/socialbutton/browser/viewlet.py   hexagonit.socialbutton(Download)
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.User import SpecialUser
from Products.CMFCore.utils import getToolByName
    def __exit__(self, exc_type, exc_value, traceback):
        setSecurityManager(self.real_sm)
 
 
class SocialButtonsViewlet(ViewletBase):

src/r/a/raptus.mercurialstorage-1.0b4/raptus/mercurialstorage/queue.py   raptus.mercurialstorage(Download)
from persistent.list import PersistentList
 
from AccessControl.SecurityManagement import setSecurityManager, getSecurityManager, newSecurityManager
 
from zope.annotation import IAnnotations
    def post_execute(self, obj, sm):
        if obj:
            _unmark_asynch(obj)
            transaction.commit()
        setSecurityManager(sm)

src/p/l/plone.api-HEAD/src/plone/api/env.py   plone.api(Download)
# -*- coding: utf-8 -*-
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from contextlib import contextmanager
    yield
 
    setSecurityManager(old_security_manager)
 
 

src/c/o/collective.spaces-1.1/src/collective/spaces/utils.py   collective.spaces(Download)
from zope.security import checkPermission
 
from AccessControl.SecurityManagement import getSecurityManager, \
        setSecurityManager, newSecurityManager
from AccessControl.User import UnrestrictedUser
                raise
            finally:
                setSecurityManager(old_sm)
 
        return result

src/e/a/easyshop.payment-0.1a1/easyshop/payment/browser/paypal.py   easyshop.payment(Download)
# Zope imports
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.User import UnrestrictedUser
 
        ## Reset security manager
        setSecurityManager(old_sm)
 

src/c/o/collective.powertoken.core-0.3.0/collective/powertoken/core/utility.py   collective.powertoken.core(Download)
 
from AccessControl.User import SimpleUser, UnrestrictedUser
from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager, getSecurityManager
 
from Products.CMFCore.utils import getToolByName
            finally:
                if action.roles:
                    setSecurityManager(old_sm)
        return results
 

src/e/a/easyshop.checkout-0.1a1/easyshop/checkout/browser/order_preview.py   easyshop.checkout(Download)
# Zope imports
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.User import UnrestrictedUser
 
            ## Reset security manager
            setSecurityManager(old_sm)
 
        # Redirect

src/f/u/fui.locker-1.3.0/fui/locker/browser/lockerreservation_form.py   fui.locker(Download)
from Acquisition import aq_inner 
from Products.CMFCore.utils import getToolByName 
from AccessControl.SecurityManagement import newSecurityManager, \
	getSecurityManager, setSecurityManager
from fui.locker.content import lockerreservation
		finally:
			# Reset secutitymanager to clear elevated rights
			setSecurityManager(securityManagerBackup)
 
		fullname = get_fullname(username)

src/c/o/collective.zamqp-0.13.2/src/collective/zamqp/consumer.py   collective.zamqp(Download)
import grokcore.component as grok
 
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import getSecurityManager
    def __exit__(self, type, value, traceback):
        if self.user:
            setSecurityManager(self.old_security_manager)
 
 

Previous  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next