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/s/e/seantis.dir.events-1.2.1/seantis/dir/events/unrestricted.py   seantis.dir.events(Download)
 
from AccessControl import ClassSecurityInfo, getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager
from AccessControl.User import nobody
from AccessControl.User import UnrestrictedUser as BaseUnrestrictedUser
    finally:
        # Restore the old security manager
        setSecurityManager(sm)

src/p/r/Products.EasyNewsletter-HEAD/Products/EasyNewsletter/content/EasyNewsletter.py   Products.EasyNewsletter(Download)
from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager
from AccessControl.User import UnrestrictedUser as BaseUnrestrictedUser
 
    finally:
        # Restore the old security manager
        setSecurityManager(sm)
 

src/p/r/Products.PloneGazette-3.2.1/Products/PloneGazette/NewsletterTheme.py   Products.PloneGazette(Download)
from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.class_init import InitializeClass
                newSubscriber = self.createSubscriberObject(newId)
                newSubscriber.edit(format=format, active=0, email=emailaddress)
                setSecurityManager(oldSecurityManager)
 
                # Make URL for editing this object

src/f/t/ftw.mail-2.1.0/ftw/mail/inbound.py   ftw.mail(Download)
from AccessControl import Unauthorized
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from Acquisition import aq_inner
            raise exceptions.DisallowedSubobjectType(self.msg(), user)
        finally:
            setSecurityManager(sm)
 
    def get_user(self):

src/c/o/collective.barcamp-0.1/collective/barcamp/unrestrictor.py   collective.barcamp(Download)
# http://plone.org/documentation/manual/plone-community-developer-documentation/security-1/permissions
 
from AccessControl import ClassSecurityInfo, getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager
from AccessControl.User import nobody
    finally:
        # Restore the old security manager
        setSecurityManager(sm)
 
def unrestrictedExec(function, *args, **kwargs):

src/p/l/plone.multilingualbehavior-1.2/plone/multilingualbehavior/subscriber.py   plone.multilingualbehavior(Download)
# -*- coding: utf-8 -*-
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.User import UnrestrictedUser
        finally:
            # Restore the old security manager
            setSecurityManager(sm)
 
    def reindex_translation(self, translation):

src/p/r/Products.CMFPlone-5.0a2/Products/CMFPlone/RegistrationTool.py   Products.CMFPlone(Download)
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.User import nobody
from Products.CMFPlone.PloneBaseTool import PloneBaseTool
                    _(u"Mailing forgotten passwords has been disabled."))
        finally:
            setSecurityManager(orig_sm)
 
        # assert that we can actually get an email address, otherwise

src/p/r/Products.PloneHotfix20130618-1.3.1/Products/PloneHotfix20130618/mail_password.py   Products.PloneHotfix20130618(Download)
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from Products.CMFCore.utils import getToolByName
try:
            raise exc
    finally:
        setSecurityManager(orig_sm)
    return self._original_mailPassword(login, REQUEST, **kw)
 

src/p/r/Products.CMFPlone-HEAD/Products/CMFPlone/RegistrationTool.py   Products.CMFPlone(Download)
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.User import nobody
from Products.CMFPlone.PloneBaseTool import PloneBaseTool
                    _(u"Mailing forgotten passwords has been disabled."))
        finally:
            setSecurityManager(orig_sm)
 
        # assert that we can actually get an email address, otherwise

src/h/l/hl.plone.boardnotifications-0.8/hl/plone/boardnotifications/browser/mailin.py   hl.plone.boardnotifications(Download)
from AccessControl import Unauthorized
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
 
        # Restore original security manager
        setSecurityManager(sm)
        return mail
 

Previous  4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12  Next