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/w/i/wildcard.foldercontents-HEAD/wildcard/foldercontents/views.py   wildcard.foldercontents(Download)
# XXX This is all ripped out of plone.app.toolbar
 
from AccessControl import Unauthorized
from AccessControl import getSecurityManager
from Acquisition import aq_inner
        sm = getSecurityManager()
        if not sm.checkPermission(_permissions[factory_name], self.context):
            raise Unauthorized('You do not have permission to use this '
                               'vocabulary')
        factory = queryUtility(IVocabularyFactory, factory_name)

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
    permission = queryUtility(IPermission, name='ftw.mail.AddInboundMail')
    if permission is None:
        raise Unauthorized("Cannot create %s" % content.portal_type)
    if not getSecurityManager().checkPermission(permission.title, container):
        raise Unauthorized("Cannot create %s" % content.portal_type)

src/c/o/collective.tablepage-0.8a1/collective/tablepage/browser/label.py   collective.tablepage(Download)
# -*- coding: utf-8 -*-
 
from AccessControl import Unauthorized
from AccessControl import getSecurityManager
from plone.memoize.view import memoize
        b_start = form.get('b_start', None)
        if not self.check_labeling_permission():
            raise Unauthorized("You can't modify the label")
        if form.get('cancel'):
            return request.response.redirect("%s/edit-table%s" % (context.absolute_url(),

src/p/r/Products.remember-1.9.3/Products/remember/tools/registration.py   Products.remember(Download)
import random
from smtplib import SMTPRecipientsRefused
 
from AccessControl import ClassSecurityInfo
from AccessControl import Unauthorized
        membership = getToolByName(self, 'portal_membership')
        if not membership.checkPermission('Mail forgotten password', self):
            raise Unauthorized("Mailing forgotten passwords has been disabled")
 
        utils = getToolByName(self, 'plone_utils')

src/p/l/plone.app.discussion-2.3.2/plone/app/discussion/browser/comments.py   plone.app.discussion(Download)
# -*- coding: utf-8 -*-
from Acquisition import aq_inner
 
from AccessControl import Unauthorized
from AccessControl import getSecurityManager
            '@@conversation_view'
        ).enabled():
            raise Unauthorized("Discussion is not enabled for this content "
                               "object.")
 
        else:  # pragma: no cover
            raise Unauthorized(
                u"Anonymous user tries to post a comment, but anonymous "
                u"commenting is disabled. Or user does not have the "
                u"'reply to item' permission."

src/p/l/plone.app.discussion-HEAD/plone/app/discussion/browser/comments.py   plone.app.discussion(Download)
# -*- coding: utf-8 -*-
from Acquisition import aq_inner
 
from AccessControl import Unauthorized
from AccessControl import getSecurityManager
            '@@conversation_view'
        ).enabled():
            raise Unauthorized("Discussion is not enabled for this content "
                               "object.")
 
        else:  # pragma: no cover
            raise Unauthorized(
                u"Anonymous user tries to post a comment, but anonymous "
                u"commenting is disabled. Or user does not have the "
                u"'reply to item' permission."

src/p/r/Products.PloneKeywordManager-2.1/Products/PloneKeywordManager/tool.py   Products.PloneKeywordManager(Download)
from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from AccessControl import Unauthorized
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from zope import interface
        if not getSecurityManager().checkPermission(
                config.MANAGE_KEYWORDS_PERMISSION, context):
            raise Unauthorized("You don't have the necessary permissions to "
                               "access %r." % context)
 

src/p/r/Products.CMFEditions-2.2.9/Products/CMFEditions/CopyModifyMergeRepositoryTool.py   Products.CMFEditions(Download)
from Acquisition import aq_base, aq_parent, aq_inner
from Acquisition import ImplicitAcquisitionWrapper
from AccessControl import ClassSecurityInfo, Unauthorized
from OFS.SimpleItem import SimpleItem
from BTrees.OOBTree import OOBTree
        # access is check on the object when needed.
        if not _checkPermission(permission, obj):
            raise Unauthorized(name)
 
    def _prepareSysMetadata(self, comment):

src/a/p/appy-0.8.5/appy/gen/utils.py   appy(Download)
                break
        if not allowed:
            from AccessControl import Unauthorized
            raise Unauthorized("User can't create instances of %s" % \
                               ZopeClass.__name__)

src/a/p/appy-0.8.5/appy/fields/ref.py   appy(Download)
        may = self.mayAdd(obj)
        if not may:
            from AccessControl import Unauthorized
            raise Unauthorized("User can't write Ref field '%s' (%s)." % \
                               (self.name, may.msg))

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