Commit 81e3ffa9 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added role definition documentation in business templates

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27087 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 02eb681a
# -*- 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):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment