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/p/r/Products.CMFEditions-HEAD/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/m/o/monet.mapsviewlet-0.6.2/monet/mapsviewlet/browser/maps_view.py   monet.mapsviewlet(Download)
# -*- coding: utf-8 -*-
 
from Acquisition import aq_inner
from AccessControl import Unauthorized
 
    def enable(self):
        """Enable the map"""
        if not self.canEnable():
            raise Unauthorized("You can't enable the map for this content")
        context = self.context
    def disable(self):
        """Disable the map"""
        if not self.canDisable():
            raise Unauthorized("You can't enable the map for this content")
        context = self.context

src/p/r/Products.LDAPUserFolder-2.27/Products/LDAPUserFolder/LDAPMembershipTool.py   Products.LDAPUserFolder(Download)
 
from AccessControl import ClassSecurityInfo
from AccessControl import Unauthorized
from App.class_init import default__class_init__ as InitializeClass
 
 
        else:
            raise Unauthorized('You need the \'Manage users\' '
                               'permission for the underlying User Folder.')
 

src/c/o/collective.cover-1.0a8.post1/src/collective/cover/tiles/edit.py   collective.cover(Download)
# -*- coding: utf-8 -*-
 
from AccessControl import Unauthorized
from plone import api
from plone.app.tiles.browser.edit import DefaultEditForm
        if not tile.isAllowedToEdit():
            raise Unauthorized(
                _(u'You are not allowed to add this kind of tile'))
 
    @button.buttonAndHandler(_(u'Save'), name='save')

src/p/r/Products.CMFPlacefulWorkflow-1.6.0/Products/CMFPlacefulWorkflow/PlacefulWorkflowTool.py   Products.CMFPlacefulWorkflow(Download)
from AccessControl.requestmethod import postonly
from AccessControl import ClassSecurityInfo
from AccessControl import Unauthorized
from Acquisition import aq_parent
from App.class_init import InitializeClass
            return None
        if not _checkPermission(ManageWorkflowPolicies, ob):
            raise Unauthorized("You need %s permission on %s" % (
               ManageWorkflowPolicies, '/'.join(ob.getPhysicalPath())))
 

src/c/o/collective.cover-HEAD/src/collective/cover/tiles/edit.py   collective.cover(Download)
# -*- coding: utf-8 -*-
 
from AccessControl import Unauthorized
from plone import api
from plone.app.tiles.browser.edit import DefaultEditForm
        if not tile.isAllowedToEdit():
            raise Unauthorized(
                _(u'You are not allowed to add this kind of tile'))
 
    @button.buttonAndHandler(_(u'Save'), name='save')

src/p/r/Products.SilvaForum-3.0.3/Products/SilvaForum/views.py   Products.SilvaForum(Download)
import transaction
 
from AccessControl import getSecurityManager, Unauthorized
from DateTime import DateTime
 
    def authenticate(self):
        if not self.is_logged_in:
            msg = _('Sorry, you need to be authenticated to use this forum.')
            raise Unauthorized(msg)
        return True

src/p/l/plonesocial.microblog-0.5.3/plonesocial/microblog/statuscontainer.py   plonesocial.microblog(Download)
from Acquisition import Explicit
from AccessControl import getSecurityManager
from AccessControl import Unauthorized
from Products.CMFCore.utils import getToolByName
 
            permission = "Plone Social: Add Microblog Status Update"
        if not getSecurityManager().checkPermission(permission, self):
            raise Unauthorized("You do not have permission <%s>" % permission)
 
    def _notify(self, status):

src/c/o/collective.unresettableuser-0.2.0/collective/unresettableuser/browser/password_form.py   collective.unresettableuser(Download)
# -*- coding: utf-8 -*-
 
from AccessControl import Unauthorized
from zope.interface import Interface
from Products.Five.browser import BrowserView
    def can_reset_my_password(self):
        member = getToolByName(self.context, 'portal_membership').getAuthenticatedMember()
        if member.getProperty('block_password_reset'):
            raise Unauthorized("You can't reset this user's password")
        return False

src/p/r/Products.CMFLDAP-1.0/Products/CMFLDAP/LDAPMembershipTool.py   Products.CMFLDAP(Download)
 
from AccessControl import ClassSecurityInfo
from AccessControl import Unauthorized
from App.class_init import default__class_init__ as InitializeClass
 
 
        else:
            raise Unauthorized('You need the \'Manage users\' '
                               'permission for the underlying User Folder.')
 

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