[Erp5-report] r22714 - /erp5/trunk/products/ERP5/Document/BusinessTemplate.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Jul 29 12:24:18 CEST 2008
Author: jerome
Date: Tue Jul 29 12:24:18 2008
New Revision: 22714
URL: http://svn.erp5.org?rev=22714&view=rev
Log:
the log added in https://svn.erp5.org/?view=rev&revision=22250 was really to
verbose. Instead verify if the permission name is valid and don't try to
install it if not valid.
Modified:
erp5/trunk/products/ERP5/Document/BusinessTemplate.py
Modified: erp5/trunk/products/ERP5/Document/BusinessTemplate.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BusinessTemplate.py?rev=22714&r1=22713&r2=22714&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BusinessTemplate.py (original)
+++ erp5/trunk/products/ERP5/Document/BusinessTemplate.py Tue Jul 29 12:24:18 2008
@@ -2604,6 +2604,8 @@
else:
items = self._archive
+ valid_permissions = dict.fromkeys([x[0] for x in
+ context.ac_inherited_permissions(all=1)])
for id in items.keys():
if update_dict.has_key(id) or force:
if not force:
@@ -2620,13 +2622,8 @@
module.setTitle(str(mapping['title']))
for name, role_list in list(mapping['permission_list']):
acquire = (type(role_list) == type([]))
- try:
+ if name in valid_permissions:
module.manage_permission(name, roles=role_list, acquire=acquire)
- except ValueError:
- # Ignore a permission not present in this system.
- LOG('ERP5', PROBLEM,
- 'Unable to update module permission "%s" with roles %s' % (
- name, role_list), error=sys.exc_info())
def _importFile(self, file_name, file):
dict = {}
More information about the Erp5-report
mailing list