Monday, August 31, 2015¶
This weekend an optimization in
in order to produce
Worked on #469. New module
first session revealed a subtle bug: actors with an empty set as
required_roles were not visible
to anonymous users because actions also required SiteUser.
The murder bug¶
We finally managed to reproduce and understand what we internally called the murder bug. This bug had caused several cases of sudden data loss, hundreds of persons vanishing “overnight”. Continued from 20150824 (Monday, 24 August 2015) for the hopefully last time.
The situation where Lino’s
lino.core.ddh failed to throw a veto
was the following: when deleting an MTI child, Lino did not ask vetos
from its MTI parents. For example when deleting a person who is being
used as the
a user, then Lino ran only the DDH for the Person, not those for the
And since we now had a reproducible case, I discovered and fixed
another bug: that new loop in
kernel_startup (which sets on_delete to
PROTECT for the FK fields which are not listed in their model’s
allow_cascaded_delete) did not work due to a
simple typo bug (
== instead of
Added three test cases and a diagnostic utility:
Preventing accidental deletes (in
The disable_delete method (using
Checkin. Release in Eupen. Last optimizations on #363.
One day I should write more about how Lino manages to make deleting more secure. I stumbled over Stefan Haflidason’s article Safer (Soft) Deletion in Django how complex things are.
Another thing to do is to check whether django-reversion
<https://github.com/etianen/django-reversion> would be a replacement