Commit 1f499401 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Ignore permission not present.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4151 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bac66c42
...@@ -1373,7 +1373,11 @@ class ModuleTemplateItem(BaseTemplateItem): ...@@ -1373,7 +1373,11 @@ class ModuleTemplateItem(BaseTemplateItem):
module.setTitle(str(mapping['title'])) module.setTitle(str(mapping['title']))
for name,role_list in list(mapping['permission_list']): for name,role_list in list(mapping['permission_list']):
acquire = (type(role_list) == type([])) acquire = (type(role_list) == type([]))
module.manage_permission(name, roles=role_list, acquire=acquire) try:
module.manage_permission(name, roles=role_list, acquire=acquire)
except ValueError:
# Ignore a permission not present in this system.
pass
def _importFile(self, file_name, file): def _importFile(self, file_name, file):
dict = {} dict = {}
......
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