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

All Samples(476)  |  Call(297)  |  Derive(0)  |  Import(179)

        def InitializeClass(self):
    from AccessControl.Permission import registerPermissions
    from AccessControl.PermissionRole import PermissionRole
    dict=self.__dict__
    have=dict.has_key
    ft=type(InitializeClass)
    dict_items=dict.items()

    for name, v in dict_items:
        if getattr(v, '_need__name__', 0):
            d = v.__dict__
            oldname = d.get('__name__', '')
            if d.get('_implicit__name__', 0):
                # Already supplied a name.
                if name != oldname:
                    # Tried to implicitly assign a different name!
                    try: classname = '%s.%s' % (
                        self.__module__, self.__name__)
                    except AttributeError: classname = `self`
                    logging.getLogger("Init").warning(
                        'Ambiguous name for method of %s: %r != %r',
                        classname, d['__name__'], name)
            else:
                # Supply a name implicitly so that the method can
                # find the security assertions on its container.
                v._implicit__name__ = 1
                v.__name__ = name
            if name=='manage' or name[:7]=='manage_':
                name=name+'__roles__'
                if not have(name):
                    setattr(self, name, ('Manager',))
        elif name=='manage' or name[:7]=='manage_' and type(v) is ft:
            name=name+'__roles__'
            if not have(name):
                setattr(self, name, ('Manager',))

    # Look for a SecurityInfo object on the class. If found, call its
    # apply() method to generate __ac_permissions__ for the class. We
    # delete the SecurityInfo from the class dict after it has been
    # applied out of paranoia.
    for key, value in dict_items:
        if hasattr(value, '__security_info__'):
            security_info=value
            security_info.apply(self)
            delattr(self, key)
            break

    if self.__dict__.has_key('__ac_permissions__'):
        registerPermissions(self.__ac_permissions__)
        for acp in self.__ac_permissions__:
            pname, mnames = acp[:2]
            if len(acp) > 2:
                roles = acp[2]
                pr = PermissionRole(pname, roles)
            else:
                pr = PermissionRole(pname)
            for mname in mnames:
                setattr(self, mname+'__roles__', pr)
                if (mname and mname not in ('context', 'request') and
                    not hasattr(self, mname)):
                    # don't complain about context or request, as they are
                    # frequently not available as class attributes
                    logging.getLogger("Init").warning(
                        "Class %s.%s has a security declaration for "
                        "nonexistent method %r", self.__module__,
                        self.__name__, mname)
        


src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLPayroll.py   Products.BastionLedger(Download)
        #self.manage_reindexIndex(['tags'])
 
AccessControl.class_init.InitializeClass(BLPayroll)
 
 
        self.calculateRunningTotals()
 
AccessControl.class_init.InitializeClass(BLPaySlip)
 
 
            payslip._repair()
 
AccessControl.class_init.InitializeClass(BLEmployee)
 
manage_addBLEmployeeEntryTemplateForm = PageTemplateFile('zpt/add_emplentrytmpl', globals()) 
                         self.aq_parent.aq_parent.getId()) ]
 
AccessControl.class_init.InitializeClass(BLEmployeeEntryTemplate)
 
manage_addBLTimesheetSlotForm = PageTemplateFile('zpt/add_timesheetslot', globals()) 
 
 
AccessControl.class_init.InitializeClass(BLTimesheetSlot)
 
 

src/z/o/Zope2-2.13.22/src/App/ApplicationManager.py   Zope2(Download)
import urllib
 
from AccessControl.class_init import InitializeClass
from AccessControl.requestmethod import requestmethod
from AccessControl.SecurityManagement import getSecurityManager
    manage_cacheGC = DTMLFile('dtml/cacheGC', globals())
 
InitializeClass(DatabaseManager)
 
 
        return res
 
InitializeClass(DatabaseChooser)
 
 
        return list(sys.path)
 
InitializeClass(DebugManager)
 
 

src/z/o/Zope2-2.13.22/src/Products/PageTemplates/ZopePageTemplate.py   Zope2(Download)
import re
 
from AccessControl.class_init import InitializeClass
from AccessControl.Permissions import change_page_templates
from AccessControl.Permissions import ftp_access
        return self.document_src(REQUEST)
 
InitializeClass(Src)
 
class ZopePageTemplate(Script, PageTemplate, Historical, Cacheable,
 
 
InitializeClass(ZopePageTemplate)
 
setattr(ZopePageTemplate, 'source.xml',  ZopePageTemplate.source_dot_xml)

src/z/o/Zope2-2.13.22/src/Shared/DC/Scripts/Script.py   Zope2(Download)
from urllib import quote
 
from AccessControl.class_init import InitializeClass
from AccessControl.Permissions import view_management_screens
from AccessControl.SecurityInfo import ClassSecurityInfo
    from Signature import _setFuncSignature
 
InitializeClass(Script)
 

src/z/o/Zope2-2.13.22/src/Shared/DC/Scripts/BindingsUI.py   Zope2(Download)
##############################################################################
 
from AccessControl.class_init import InitializeClass
from AccessControl.Permissions import view_management_screens
from AccessControl.SecurityInfo import ClassSecurityInfo
        return self.manage_main(self, REQUEST, manage_tabs_message=message)
 
InitializeClass(BindingsUI)
 

src/z/o/Zope2-2.13.22/src/Shared/DC/Scripts/Bindings.py   Zope2(Download)
import string
 
from AccessControl.class_init import InitializeClass
from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager
            security.removeContext(self)
 
InitializeClass(Bindings)
 

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLInventory.py   Products.BastionLedger(Download)
 
 
AccessControl.class_init.InitializeClass(BLPartFolder)
 
class BLDispatcher( ZCatalog, PropertyManager ):
	    return self.manage_main(self, REQUEST)
 
AccessControl.class_init.InitializeClass(BLDispatcher)
 
class BLDispatchable(PropertyManager, PortalContent):
        self.indexObject()
 
AccessControl.class_init.InitializeClass(BLDispatchable)
 
manage_addBLInventoryForm = PageTemplateFile('zpt/add_inventory', globals()) 
            self.dispatcher = BLDispatcher('dispatcher')
 
AccessControl.class_init.InitializeClass(BLInventory)
 
manage_addBLPartForm = PageTemplateFile('zpt/add_part', globals()) 
        return self.sellprice
 
AccessControl.class_init.InitializeClass(BLPart)
 
def addBLInventory(self, id, title=''):

src/p/r/Products.BastionLedger-4.6.0/Products/BastionLedger/BLBase.py   Products.BastionLedger(Download)
         manage_main = DTMLFile('dtml/main', globals())
 
    AccessControl.class_init.InitializeClass(OrderedFolder)
 
    class BaseContent( DynamicType, DefaultDublinCoreImpl, SimpleItem, CMFCatalogAware, Referenceable):
            self._referenceApply('manage_afterAdd', item, container)
 
    AccessControl.class_init.InitializeClass(BaseContent)
 
    DO_PLONE = 1
                             self.propertyMap()))
 
AccessControl.class_init.InitializeClass(PortalContent)
 
 
    getIcon = PortalContent.getIcon
 
AccessControl.class_init.InitializeClass(PortalFolder)
 
 
    getIcon = PloneFolder.getIcon
 
AccessControl.class_init.InitializeClass(LargePortalFolder)
 
 

src/z/o/Zope2-2.13.22/src/webdav/NullResource.py   Zope2(Download)
import sys
 
from AccessControl.class_init import InitializeClass
from AccessControl.SecurityInfo import ClassSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager
            RESPONSE.setBody(lock.asXML())
 
InitializeClass(NullResource)
 
 
        return RESPONSE
 
InitializeClass(LockNullResource)
 

src/z/o/Zope2-2.13.22/src/OFS/userfolder.py   Zope2(Download)
 
from AccessControl import ClassSecurityInfo
from AccessControl.class_init import InitializeClass
from AccessControl.Permissions import manage_users as ManageUsers
from AccessControl.requestmethod import requestmethod
                action='./manage_main'))
 
InitializeClass(BasicUserFolder)
 
 
                    pass
 
InitializeClass(UserFolder)
 
 

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