Commit a2ad3693 authored by Romain Courteaud's avatar Romain Courteaud

Call finishConstruction after generating local roles on object, in order to

prevent Unauthorized error on workflow transition's condition.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19073 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 74e666a1
...@@ -278,7 +278,6 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -278,7 +278,6 @@ class ERP5TypeInformation( FactoryTypeInformation,
# Then keep on the construction process # Then keep on the construction process
ob = self._constructInstance(container, id, *args, **kw) ob = self._constructInstance(container, id, *args, **kw)
ob = self._finishConstruction(ob)
# Only try to assign roles to security groups if some roles are defined # Only try to assign roles to security groups if some roles are defined
# This is an optimisation to prevent defining local roles on subobjects # This is an optimisation to prevent defining local roles on subobjects
...@@ -288,6 +287,8 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -288,6 +287,8 @@ class ERP5TypeInformation( FactoryTypeInformation,
if len(self._roles): if len(self._roles):
self.updateLocalRolesOnSecurityGroups(ob) self.updateLocalRolesOnSecurityGroups(ob)
ob = self._finishConstruction(ob)
if self.init_script : if self.init_script :
# Acquire the init script in the context of this object # Acquire the init script in the context of this object
init_script = getattr(ob, self.init_script) init_script = getattr(ob, self.init_script)
......
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