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/r/Products.EasyNewsletter-2.6.12/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
 
class UnrestrictedUser(BaseUnrestrictedUser):
    """Unrestricted user that still has an id.
    """
 
    def getId(self):

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
 
class UnrestrictedUser(BaseUnrestrictedUser):
    """Unrestricted user that still has an id.
    """
 
    def getId(self):

src/p/r/Products.PluggableAuthService-1.10.0/Products/PluggableAuthService/tests/test_PluggableAuthService.py   Products.PluggableAuthService(Download)
            import IExtractionPlugin
 
        from AccessControl.User import UnrestrictedUser
 
        from Products.PluggableAuthService import PluggableAuthService
 
        old_eu = PluggableAuthService.emergency_user
 
        eu = UnrestrictedUser( 'foo', 'bar', ( 'manage', ), () )
            import IExtractionPlugin, IAuthenticationPlugin
 
        from AccessControl.User import UnrestrictedUser
 
        from Products.PluggableAuthService import PluggableAuthService
 
        old_eu = PluggableAuthService.emergency_user
 
        eu = UnrestrictedUser( 'foo', 'bar', ( 'manage', ), () )
            import IExtractionPlugin, IAuthenticationPlugin
 
        from AccessControl.User import UnrestrictedUser
 
        from Products.PluggableAuthService import PluggableAuthService

src/p/r/Products.AttachmentField-1.4.5/Products/AttachmentField/tests/test_fields.py   Products.AttachmentField(Download)
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from OFS.Image import File
from DateTime import DateTime
    def fakeUpload(self):
        current_user = getSecurityManager().getUser()
        newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
        dummy = self._dummy
        request = FakeRequest()
    def test_get(self):
        current_user = getSecurityManager().getUser()
        newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
        dummy = self.makeDummy()
        request = FakeRequest()
    def test_set(self):
        """Same as previous but with fieldsets"""
        current_user = getSecurityManager().getUser()
        newSecurityManager(None, UnrestrictedUser('manager', '', ['Manager'], []))
        dummy = self.makeDummy()

src/p/r/Products.CMFDefault-2.3.0-beta2/Products/CMFDefault/tests/test_Portal.py   Products.CMFDefault(Download)
 
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from Acquisition import aq_base
from zope.component import queryUtility
    def _makeContent( self, site, portal_type, id='document', **kw ):
        newSecurityManager(None, UnrestrictedUser('god', '', ['Manager'], ''))
 
        site.invokeFactory( type_name=portal_type, id=id )
        content = getattr( site, id )

src/p/r/Products.CMFDefault-2.3.0-beta2/Products/CMFDefault/upgrade/tests/test_upgrade.py   Products.CMFDefault(Download)
 
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from Products.CMFCore.tests.base.testcase import WarningInterceptor
from Products.CMFDefault.testing import FunctionalLayer
                         ('2', '3'))
 
        newSecurityManager(None, UnrestrictedUser('god', '', ['Manager'], ''))
        setSite(self.app.site)
        expected_export = self.app.site.portal_setup.runAllExportSteps()

src/p/r/Products.CMFDefault-2.3.0-beta2/Products/CMFDefault/tests/test_Image.py   Products.CMFDefault(Download)
import transaction
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from App.Common import rfc1123_date
from zope.component import getSiteManager
    def afterSetUp(self):
        setSite(self.app.site)
        newSecurityManager(None, UnrestrictedUser('god', '', ['Manager'], ''))
 
        self.site = self.app.site

src/c/o/collective.testing-0.3/collective/testing/utils.py   collective.testing(Download)
def newuser():
    """ loads up an unrestricted security manager"""
    from AccessControl.SecurityManagement import newSecurityManager
    from AccessControl.User import UnrestrictedUser
    newSecurityManager( {}, UnrestrictedUser('debug', 'debug', [], [] ))

src/p/r/Products.GenericSetup-1.7.4/Products/GenericSetup/tests/common.py   Products.GenericSetup(Download)
 
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from Testing.ZopeTestCase import ZopeTestCase
from zope.interface import implements
    def afterSetUp(self):
        self.root = self.app
        newSecurityManager(None, UnrestrictedUser('god', '', ['Manager'], ''))
 
    def _makeOne( self, *args, **kw ):

src/p/r/Products.CMFTopic-2.3.0-beta/Products/CMFTopic/tests/test_Topic.py   Products.CMFTopic(Download)
 
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.User import UnrestrictedUser
from Acquisition import Implicit
from zope.component import getSiteManager
    def afterSetUp(self):
        setSite(self.app.site)
        self.app.site.setupCurrentSkin(self.app.REQUEST)
        newSecurityManager(None, UnrestrictedUser('god', '', ['Manager'], ''))
 

Previous  1 | 2 | 3 | 4 | 5  Next