Logo Search packages:      
Sourcecode: zope-cmfformcontroller version File versions

def zope-cmfformcontroller-1.0.3::FormController::FormController::_checkId (   self,
  id 
) [private]

See if an id is valid CMF/Plone id

Definition at line 93 of file FormController.py.

00093                           :
        """See if an id is valid CMF/Plone id"""
        portal = getToolByName(self, 'portal_url').getPortalObject()
        if not id:
            return 'Empty id'
        s = bad_id(id)
        if s:
            return '\'%s\' is not a valid id' % (id)
        # extra checks for Plone sites
        if portal.__class__.__name__ == 'PloneSite':
            if hasattr(portal, 'portal_properties') and \
                hasattr(portal.portal_properties, 'site_properties') and \
                hasattr(portal.portal_properties.site_properties, 'invalid_ids'):
                if id in portal.portal_properties.site_properties.invalid_ids:
                    return '\'%s\' is a reserved id' % (id)


    # Web-accessible methods
    security.declareProtected(ManagePortal, 'listActionTypes')


Generated by  Doxygen 1.6.0   Back to index