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/c/s/cs.board-1.7.2/cs/board/browser/api.py   cs.board(Download)
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl import getSecurityManager
from AccessControl.User import UnrestrictedUser
 
 
 
        current_user = getSecurityManager().getUser()
        newSecurityManager(None, UnrestrictedUser('andago', '', ['Manager'], []))
 
        wtool = getToolByName(self.context, 'portal_workflow')
    def get_filetype_info(self, filetype):
        current_user = getSecurityManager().getUser()
        newSecurityManager(None, UnrestrictedUser('andago', '', ['Manager'], []))
        ret =  self.decorateBrains(self.portal_catalog(filetype=filetype, portal_type='BoardDocument', Language='es'))
 
    def get_file_info(self, filenumber):
        current_user = getSecurityManager().getUser()
        newSecurityManager(None, UnrestrictedUser('andago', '', ['Manager'], []))
 
        ret = self.decorateBrains(self.portal_catalog(filenumber=filenumber, portal_type='BoardDocument', Language='es'))

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
 
class PrivilegedUser(UnrestrictedUser):
    if user.getId() is None and not anonymous:
      # This is a special user, thus the user is not allowed to own objects.
      super_user = UnrestrictedUser(user.getUserName(), None,
                                    user.getRoles(), user.getDomains())
    else:

src/p/r/Products.PloneArticle-4.2.0/Products/PloneArticle/migration/v4/betas.py   Products.PloneArticle(Download)
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
 
# CMF imports
    # XXX Something make us loose right, but we are pragmatic
    current_user = getSecurityManager().getUser()
    newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
    article.setImages(values)
    newSecurityManager(None, current_user)
    # XXX Something make us loose right, but we are pragmatic
    current_user = getSecurityManager().getUser()
    newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
    article.setFiles(values)
    newSecurityManager(None, current_user)
    # XXX Something make us loose right, but we are pragmatic
    current_user = getSecurityManager().getUser()
    newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
    article.setLinks(values)
    newSecurityManager(None, current_user)

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
        else:
            old_sm = getSecurityManager()
            tmp_user = UnrestrictedUser(old_sm.getUser().getId(),
                                        '', ['Contributor'], '')
            tmp_user = tmp_user.__of__(getToolByName(context, 'acl_users'))

src/c/o/collective.portlet.geo-1.0.2/collective/portlet/geo/security.py   collective.portlet.geo(Download)
from AccessControl import ClassSecurityInfo, getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
 
def loginAsUnrestrictedUser():
 
    current_user = getSecurityManager().getUser()
    newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
    return current_user
 

src/p/r/Products.PloneSubscription-1.6.3/Products/PloneSubscription/Extensions/MaintenanceToolbox.py   Products.PloneSubscription(Download)
from AccessControl import ClassSecurityInfo, getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
 
from Products.CMFCore.utils import getToolByName
 
    current_user = getSecurityManager().getUser()
    newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
    sub_tool.mailing()
    newSecurityManager(None, current_user)

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

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

src/p/l/plone.app.multilingual-2.0a2/devel/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

  1 | 2 | 3 | 4 | 5  Next