Enable erp5 login user manager in post_upgrade
I just simulated an upgrade for an ERP5 running a version from before !185 (merged), ERP5UserManager Non Existence_constraint
properly disabled old acl_users/erp5_users
and migrated all persons, but ERP5UserLoginManager Existence_constraint
did not activate acl_users/erp5_login_users
.
This is because ERP5UserLoginManager Existence_constraint
is registered as a pre-upgrade constraint, but with my upgrade scenario, pre-upgrade constraint are installed too late.
The upgrade scenario was:
- install new ERP5 SR on slapos
- manually install new versions of erp5_upgrader and customer_configuration_upgrader business template
- run upgrade ( sense then fix on portal_alarms/promise_check_upgrade )
During step 3, when pre-upgrade constraints are executed, erp5_base is not installed yet, so ERP5UserLoginManager Existence_constraint
can not run because it's not installed yet.
My suggestion is to change it to a post-upgrade constraint.
If I understand correctly and my upgrade scenario is really the supported one, it means we can only have pre-upgrade constraints in erp5_upgrader.
( I also fix a meaningless typo in the same code)