Commit cdf3f66a authored by Jérome Perrin's avatar Jérome Perrin

don't uninstall all local roles, only the ones passed in object_path


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34196 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 571b88fb
......@@ -4723,9 +4723,13 @@ class LocalRolesTemplateItem(BaseTemplateItem):
setattr(obj, '__ac_local_roles__', local_roles_dict)
obj.reindexObject()
def uninstall(self, context, **kw):
def uninstall(self, context, object_path=None, **kw):
p = context.getPortalObject()
for roles_path in self._objects.keys():
if object_path is not None:
keys = [object_path]
else:
keys = self._objects.keys()
for roles_path in keys:
path = roles_path.split('/')[1:]
obj = p.unrestrictedTraverse(path)
setattr(obj, '__ac_local_roles__', {})
......
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