diff --git a/product/ERP5Type/DocumentationHelper/BusinessTemplateDocumentationHelper.py b/product/ERP5Type/DocumentationHelper/BusinessTemplateDocumentationHelper.py index 44e7fa88bdc29b3a25018e73f04e51314f96a057..1a29d992310ae063b78fb78402525217c0be368e 100644 --- a/product/ERP5Type/DocumentationHelper/BusinessTemplateDocumentationHelper.py +++ b/product/ERP5Type/DocumentationHelper/BusinessTemplateDocumentationHelper.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ############################################################################## # @@ -77,6 +78,11 @@ class BusinessTemplateDocumentationHelper(DocumentationHelper): title='Base Category', class_name='BaseCategoryDocumentationHelper', ), + dict( + id='template_role', + title='Role Definitions', + class_name='BusinessTemplateRoleDocumentationHelper', + ), ) security.declareProtected(Permissions.AccessContentsInformation, 'getType') @@ -241,6 +247,20 @@ class BusinessTemplateDocumentationHelper(DocumentationHelper): base_uri = '/'+self.uri.split('/')[1]+'/portal_catalog' return map(lambda x: ('%s/%s' % (base_uri, x)), catalog_method_list) + security.declareProtected(Permissions.AccessContentsInformation, 'getTemplateRoleIdList') + def getTemplateRoleIdList(self): + """ + """ + return self.getDocumentedObject().getTemplatePortalTypeRoleList([]) + + security.declareProtected(Permissions.AccessContentsInformation, 'getTemplateRoleUriList') + def getTemplateRoleUriList(self): + """ + """ + portal_type_list = self.getPortalTypeIdList() + base_uri = '/'+self.uri.split('/')[1]+'/portal_types' + return map(lambda x: ('%s/%s' % (base_uri, x)), portal_type_list) + security.declareProtected(Permissions.AccessContentsInformation, 'getTemplatePathList') def getTemplatePathList(self): """