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

All Samples(3)  |  Call(1)  |  Derive(0)  |  Import(2)

src/c/o/collective.local.sendto-1.6/collective/local/sendto/browser/view.py   collective.local.sendto(Download)
from AccessControl.ImplPython import rolesForPermissionOn
from zope.i18n import translate
from zope.i18nmessageid.message import MessageFactory
 
from Products.Five.browser import BrowserView
    def _recipient_roles(self):
        roles = getToolByName(self.context, 'portal_properties').site_properties.sendToRecipientRoles
        roles = [r for r in roles if r in rolesForPermissionOn('View', self.context)]
        return roles
 

src/e/r/erp5-HEAD/product/ERP5Type/Accessor/Base.py   erp5(Download)
from Products.ERP5Type.Cache import CachingMethod
from Products.ERP5Type.PsycoWrapper import psyco
from AccessControl.ImplPython import rolesForPermissionOn
from AccessControl.PermissionRole import PermissionRole