erp5_base: recalculate user group after closing the assignment
If user group are recalculated before changing the workflow state, it will only return the same security group See nexedi/erp5@c00c3636
-
Maintainer
@jerome I'm so surprised of this. I feel I misunderstood something.
Do you agree that recalculating the user security group in the before script is useless (as the assignment list is still identical)?
Is there any side effect which will be triggered unexpectedly when calling this script after changing the assignment state?
-
Developer
In nexedi/erp5@c00c3636 I changed the
Assignment_updateUserSecurityGroup
to be called "before", it was called "after" before this change... This looks accidental.But do you remember NuxUserGroups ? it seems what this script does is https://lab.nexedi.com/romain/erp5/blob/639bb4617dcd3158795261c75ca14e04c66e57ec/bt5/erp5_base/WorkflowTemplateItem/portal_workflow/assignment_workflow/script_Assignment_updateUserSecurityGroup.py#L15 , ie. compute the groups of the person based on the assignment. So yes, this change looks correct, but it seems to me that
Person_updateUserSecurityGroup
is not doing anything since we switched from NuxuserGroups to PluggableAuthService, maybe 15 years ago. Do you think this is still used ? -
Maintainer
Is the clearCache still valid? I have some tests on the slapos master which fail randomly due to security group of the user not dropped after the assignment is closed.
But do you remember NuxUserGroups ?
Not at all. But I could try to drop
Person_updateUserSecurityGroup
to see if I break everything. -
Maintainer
ok, I'll try.
Thanks for your answers.