Commit 4c1d9290 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Secure the template tool.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4659 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7ee0854a
......@@ -659,6 +659,16 @@ class ERP5Generator(PortalGenerator):
addTool = p.manage_addProduct['CMFActivity'].manage_addTool
addTool('CMF Activity Tool', None) # Allow user to select active/passive
def setupTemplateTool(self, p, **kw):
"""Setup the Template Tool. Security must be set strictly.
"""
addTool = p.manage_addProduct['ERP5'].manage_addTool
addTool('ERP5 Template Tool', None)
context = p.portal_templates
permission_list = context.possible_permissions()
for permission in permission_list:
context.manage_permission(permission, ['Manager'], 0)
def setupTools(self, p,**kw):
"""Set up initial tools"""
......@@ -680,6 +690,7 @@ class ERP5Generator(PortalGenerator):
addTool('ERP5 Rule Tool', None)
addTool('ERP5 Id Tool', None)
addTool('ERP5 Simulation Tool', None)
self.setupTemplateTool(p)
addTool('ERP5 Template Tool', None)
addTool('ERP5 Trash Tool', None)
addTool('ERP5 Alarm Tool', None)
......
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