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

All Samples(837)  |  Call(179)  |  Derive(1)  |  Import(657)

src/e/r/erp5-HEAD/product/ERP5VCS/WorkingCopy.py   erp5(Download)
from tempfile import gettempdir
import transaction
from AccessControl import Unauthorized
from AccessControl.SecurityInfo import ModuleSecurityInfo
from Acquisition import aq_base, Implicit
      if issubdir(allowed, path) or issubdir(allowed, real_path):
        return real_path
    raise Unauthorized("Unauthorized access to path %r."
                       " It is NOT in your Zope home instance." % path)
 

src/s/i/silva.core.views-3.0.2/src/silva/core/views/ttwtemplates.py   silva.core.views(Download)
import Acquisition
from AccessControl import getSecurityManager
from AccessControl import Unauthorized
 
from Products.Five.metaclass import makeClass
        if self.permission:
            if not sm.checkPermission(self.permission, args[0]):
                raise Unauthorized('The current user does not have the '
                                   'required "%s" permission'
                                   % self.permission)

src/g/o/gomobile.mobile-1.0.5/gomobile/mobile/browser/imageprocessor.py   gomobile.mobile(Download)
from cStringIO import StringIO
 
from AccessControl import Unauthorized
from Acquisition import aq_inner
import zope.interface
 
        if width < 1 or width > safe_width:
            raise Unauthorized("Invalid width: %d" % width)
 
        if height < 1 or height > safe_height:
            raise Unauthorized("Invalid height: %d" % height)
            # for testing.
            if self.override_secret != self.resizer.getSecret():
                raise Unauthorized("Wrong override_secret:" + self.override_secret)
        else:
 
 
            if calculated != secret:
                raise Unauthorized("Bad image resizer secret:" + str(secret) + " calculated:" + str(calculated))
 
 

src/c/o/collective.noticeboard-0.6/src/collective/noticeboard/browser/noteviews.py   collective.noticeboard(Download)
#!/usr/bin/python
# -*- coding: utf-8 -*-
 
from AccessControl import getSecurityManager
from AccessControl import Unauthorized
                'Failed permission check. Required Permission "%s", user "%s"',
                perm, member)
            raise Unauthorized(_('You do not have the required permission'))
        return True
 

src/r/e/restfulgrok-1.0.2/restfulgrok/view.py   restfulgrok(Download)
            permission to perform the requested method.
        """
        from AccessControl import Unauthorized, getSecurityManager
        method = self.get_requestmethod()
        permission = self.permissions.get(method)
        if not permission:
            permission = self.permissions['default']
        if not getSecurityManager().checkPermission(permission, self):
            raise Unauthorized('Not authorized for: {0} requests. '

src/c/o/collective.emaillogin4-1.3/collective/emaillogin4/patches/cmfplone/utils.py   collective.emaillogin4(Download)
from AccessControl import getSecurityManager, Unauthorized
from Products.CMFCore.permissions import ManageUsers
from Products.CMFCore.utils import getToolByName
 
import Products.CMFPlone.utils
    secman = getSecurityManager()
    if not secman.checkPermission(ManageUsers, member):
        raise Unauthorized('You can only change your OWN login name.')
    pas.updateLoginName(member.getId(), loginname)
 

src/p/r/Products.Silva-3.0.4/Products/Silva/GhostAsset/views.py   Products.Silva(Download)
# Zope 2
from AccessControl import getSecurityManager
from AccessControl import Unauthorized
 
# Silva
        if not getSecurityManager().checkPermission(permission, haunted):
            raise Unauthorized(
                u"You do not have permission to "
                u"see the target of this ghost")
        if IDownloableAsset.providedBy(haunted):
        if not getSecurityManager().checkPermission(permission, haunted):
            raise Unauthorized(
                u"You do not have permission to "
                u"see the target of this ghost")
        view = getMultiAdapter((haunted, self.request), name='index.html')

src/f/i/five.customerize-1.1/src/five/customerize/utils.py   five.customerize(Download)
from AccessControl import getSecurityManager
from AccessControl import Unauthorized
from Products.PageTemplates.PageTemplateFile import PageTemplateFile as Z2PTF
from zope.pagetemplate.pagetemplatefile import PageTemplateFile as Z3PTF
from Products.Five.browser.pagetemplatefile import BoundPageTemplate as Z2BPT
def checkPermission(permission, context):
    sm = getSecurityManager()
    if permission is not None:
        if not sm.checkPermission(permission, context):
            raise Unauthorized('The current user does not have the '

src/c/o/collective.groupdashboard-1.0b2/collective/groupdashboard/storage.py   collective.groupdashboard(Download)
from plone.app.portlets.interfaces import IPortletPermissionChecker
 
from AccessControl import getSecurityManager, Unauthorized
from Acquisition import aq_inner
 
 
        if not sm.checkPermission("collective.groupdashboard: Edit group dashboard", context):
            raise Unauthorized("You are not allowed to manage group portlets")

src/e/e/eea.annotator-2.1/eea/annotator/browser/app/view.py   eea.annotator(Download)
from zope.component import queryMultiAdapter, queryAdapter
from zope.publisher.interfaces import IPublishTraverse
from AccessControl import Unauthorized
from Products.Five.browser import BrowserView
from Products.CMFCore.utils import getToolByName
    def create(self, **kwargs):
        """ Create
        """
        raise Unauthorized("You're not authorized to create inline comments")
 
    def update(self, **kwargs):
        """ Update
        """
        raise Unauthorized("You're not authorized to edit inline comments")
    def delete(self, **kwargs):
        """ Delete
        """
        raise Unauthorized("You're not authorized to delete inline comments")
 

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