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/e/r/erp5-HEAD/bt5/erp5_administration/ExtensionTemplateItem/portal_components/extension.erp5.Security.py   erp5(Download)
def viewSecurityAsUser(self, login):
  from AccessControl import getSecurityManager
  from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager
  user_folder = self.getPortalObject().acl_users
  sm = getSecurityManager()
    st = self.Base_viewSecurity()
  finally:
    setSecurityManager(sm)
  return st

src/e/u/Euphorie-6.3.1/src/euphorie/deployment/commands/xmlimport.py   Euphorie(Download)
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from Testing.makerequest import makerequest
from zope.site import hooks
            publisher.publish()
    finally:
        setSecurityManager(sm)
 
 

src/s/l/slapos.core-HEAD/master/bt5/slapos_slap_tool/ExtensionTemplateItem/SlapOSSlapTool.py   slapos.core(Download)
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from AccessControl.SecurityManagement import getSecurityManager, \
    setSecurityManager, newSecurityManager
 
@UnrestrictedMethod
        computer_reference, computer_reference)
  finally:
    setSecurityManager(sm)
 

src/s/l/slapos.core-HEAD/master/bt5/slapos_cloud/ExtensionTemplateItem/SlapOSSecurity.py   slapos.core(Download)
 
from Products.ERP5Security.ERP5GroupManager import ConsistencyError
from AccessControl.SecurityManagement import getSecurityManager, \
             setSecurityManager, newSecurityManager
from AccessControl import Unauthorized
    finally:
      # Restore the original user.
      setSecurityManager(sm)
 

src/s/l/slapos.core-HEAD/master/bt5/slapos_cloud/ExtensionTemplateItem/SlapOSCloud.py   slapos.core(Download)
##############################################################################
 
from AccessControl.SecurityManagement import getSecurityManager, \
             setSecurityManager, newSecurityManager
from Products.ERP5Security.ERP5UserManager import SUPER_USER
  finally:
    # Restore the original user.
    setSecurityManager(sm)
 
 

src/e/u/Euphorie-6.3.1/src/euphorie/client/unpublish.py   Euphorie(Download)
from Products.CMFCore.utils import getToolByName
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from plonetheme.nuplone.utils import getPortal
            clientcountry.manage_delObjects([clientsector.id])
    finally:
        setSecurityManager(sm)
 

src/e/u/Euphorie-6.3.1/src/euphorie/client/publish.py   Euphorie(Download)
from Acquisition import aq_parent
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from OFS.event import ObjectWillBeRemovedEvent
        survey.published = (survey.id, survey.title, datetime.datetime.now())
    finally:
        setSecurityManager(sm)
    return survey
 

src/s/l/slapos.core-HEAD/master/product/SlapOS/SlapOSShadowAuthenticationPlugin.py   slapos.core(Download)
import sys
 
from AccessControl.SecurityManagement import newSecurityManager,\
    getSecurityManager, setSecurityManager
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 
      finally:
        setSecurityManager(sm)
      return (
        'R-SHADOW-%s' % portal_type.replace(' ', '').upper(), # generic group

src/e/a/Easyshop-HEAD/src/easyshop.payment/easyshop/payment/browser/paypal.py   Easyshop(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/e/a/Easyshop-HEAD/src/easyshop.checkout/easyshop/checkout/browser/order_preview.py   Easyshop(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

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