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/a/Easyshop-HEAD/Attic_from_svn_import/easyshop.mpay24/easyshop/mpay24/browser/payment_response.py   Easyshop(Download)
from AccessControl.SecurityManagement import getSecurityManager, \
    newSecurityManager, setSecurityManager
from AccessControl.User import UnrestrictedUser
from Products.Five import BrowserView
from Products.CMFCore.utils import getToolByName
 
            # Reset security manager
            setSecurityManager(old_sm)
 
        # delete redirection cookie

src/z/o/Zope2-2.13.22/src/Products/Transience/Transience.py   Zope2(Download)
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SpecialUsers import nobody
from App.special_dtml import HTMLFile
                             exc_info=sys.exc_info())
            finally:
                setSecurityManager(sm)
        else:
            err = '%s in %s attempted to call non-callable %s'

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

src/z/o/Zope-HEAD/src/Products/Transience/Transience.py   Zope(Download)
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SpecialUsers import nobody
from App.special_dtml import HTMLFile
                             exc_info=sys.exc_info())
            finally:
                setSecurityManager(sm)
        else:
            err = '%s in %s attempted to call non-callable %s'

src/e/r/erp5-HEAD/product/ERP5Type/UnrestrictedMethod.py   erp5(Download)
from AccessControl.User import UnrestrictedUser
from AccessControl.SpecialUsers import system
from AccessControl.SecurityManagement import getSecurityManager, \
        newSecurityManager, setSecurityManager
from Products.ERP5Type.Utils import simple_decorator
    finally:
      # Make sure that the original user is back.
      setSecurityManager(security_manager)
 

src/p/r/Products.DigestoContentTypes-1.2a1/Products/DigestoContentTypes/content/Normativa.py   Products.DigestoContentTypes(Download)
from AccessControl.SecurityManagement import noSecurityManager
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.User import UnrestrictedUser
 
                          roles = parent_roles,
                          acquire=False)
    setSecurityManager(sm)
    return obj_permissions, parent_permissions
 

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

src/r/a/raptus.mercurialstorage-1.0b4/raptus/mercurialstorage/storage.py   raptus.mercurialstorage(Download)
 
from AccessControl import ClassSecurityInfo, Unauthorized
from AccessControl.SecurityManagement import getSecurityManager, newSecurityManager, setSecurityManager
from AccessControl.User import UnrestrictedUser
 
                newSecurityManager(instance.REQUEST, manager)
                ExternalStorage.initializeInstance(self, instance, item, container)
                setSecurityManager(sm)
            except Unauthorized:
                pass
            newSecurityManager(instance.REQUEST, manager)
            ExternalStorage.unset(self, name, instance, **kwargs)
            setSecurityManager(sm)
            pass
        if instance.isTemporary():

src/c/o/collective.local.contentrules-1.0rc1/src/collective/local/contentrules/stringinterp.py   collective.local.contentrules(Download)
from zope.component.hooks import getSite
from AccessControl.SecurityManagement import (
    getSecurityManager, setSecurityManager, newSecurityManager)
 
from Products.CMFCore.utils import getToolByName
                    allowed_members.append(m)
        finally:
            setSecurityManager(old_sm)
 
        # get emails

src/a/w/aws.authrss-1.0.0b2/src/aws/authrss/utils.py   aws.authrss(Download)
 
from zope.component import getUtility, getMultiAdapter
from AccessControl.SecurityManagement import (
    getSecurityManager, setSecurityManager, newSecurityManager
    )
    def __exit__(self, exc_type, exc_value, exc_tb):
        """Back to former security context
        """
        setSecurityManager(self.real_sm)
 

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