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

All Samples(103)  |  Call(40)  |  Derive(9)  |  Import(54)
User that passes all security checks.  Note, however, that modules
like Owner.py can still impose restrictions.

src/p/l/plone.app.multilingual-HEAD/src/plone/app/multilingual/dx/subscriber.py   plone.app.multilingual(Download)
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.User import UnrestrictedUser
from Acquisition import aq_parent
                # current user whould not have permission to do that.
                tmp_user = UnrestrictedUser(
                    sm.getUser().getId(), '', ['Editor', ], '')
 
                # Wrap the user in the acquisition context of the portal

src/h/l/hl.plone.boardnotifications-0.8/hl/plone/boardnotifications/browser/mailin.py   hl.plone.boardnotifications(Download)
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from OFS.Image import File
from zope.component import getUtility
        if self.fake_manager and not user.allowed(self.context, ('Manager', )):
            logger.debug("Faking Manager role for user %s", user_id)
            user = UnrestrictedUser(user_id, '', ['Manager'], '')
            faked = True
        else:

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
        old_sm = getSecurityManager()
        tmp_user = UnrestrictedUser(
            old_sm.getUser().getId(),
            '', ['Manager'], 
            ''

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
            old_sm = getSecurityManager()
            tmp_user = UnrestrictedUser(
                old_sm.getUser().getId(),
                '', ['Manager'], 
                ''

src/c/o/collective.salesforce.content-1.1/collective/salesforce/content/sync.py   collective.salesforce.content(Download)
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from Products.CMFCore.interfaces import ISiteRoot
from Products.CMFCore.utils import getToolByName
                raise Unauthorized
            # become a superuser
            user = UnrestrictedUser('manager', '', ['Manager'], [])
            newSecurityManager(None, user)
 

src/a/w/aws.minisite-1.0.2/aws/minisite/content/minisite.py   aws.minisite(Download)
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
 
from zope.component import getUtility
        # we need to force security manager since only admins can do that
        current_user = getSecurityManager().getUser()
        newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
        self.manage_addProduct['CMFPlacefulWorkflow'].manage_addWorkflowPolicyConfig()
        config = getToolByName(portal, 'portal_placeful_workflow').getWorkflowPolicyConfig(self)

src/p/r/Products.DigestoContentTypes-1.2a1/Products/DigestoContentTypes/content/Normativa.py   Products.DigestoContentTypes(Download)
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.User import UnrestrictedUser
 
##/code-section module-header
 
    sm = getSecurityManager()
    newSecurityManager(None, UnrestrictedUser('god', '', ['Manager'], ''))
    obj.manage_permission('Delete objects',
                          roles = roles,

src/c/o/collective.salesforce.content-HEAD/collective/salesforce/content/sync.py   collective.salesforce.content(Download)
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from Products.CMFCore.interfaces import ISiteRoot
from Products.CMFCore.utils import getToolByName
                raise Unauthorized
            # become a superuser
            user = UnrestrictedUser('manager', '', ['Manager'], [])
            newSecurityManager(None, user)
 

src/p/o/poi.receivemail-1.11/poi/receivemail/poimail.py   poi.receivemail(Download)
from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from OFS.Image import File
from Products.Archetypes.event import ObjectInitializedEvent
        if FAKE_MANAGER and not user.allowed(self.context, ('Manager', )):
            logger.debug("Faking Manager role for user %s", user_id)
            user = UnrestrictedUser(user_id, '', ['Manager'], '')
            faked = True
        else:

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
                # current user whould not have permission to do that.
                tmp_user = UnrestrictedUser(
                    sm.getUser().getId(), '', ['Editor', ], '')
 
                # Wrap the user in the acquisition context of the portal

Previous  1 | 2 | 3 | 4 | 5  Next