Friday, August 28, 2015

Discovered and fixed #467.

Received and fixed #471. This was simply a custom on_duplicate method for UserAuthored.

En passant also a little API change: The manager_roles_required of a UserAuthored must now be an iterable of UserRole subclasses (when not None). Until now it was expected to contain a single role, making it impossible to require several roles at once.

The above API change revealed a subtle problem which took me two hours of research: The lino.projects.min1 and lino.projects.min2 sites had their user_types_module set to lino.modlib.users.roles and not to lino.modlib.office.roles. Accordingly the user robin on these sites should not see e.g. cal.MyEvents since this table requires OfficeUser. For some reason they saw it nevertheless. I guess it has to do with the fact that the requirement sets for actor and action are being united in BoundAction and that this operation got inadvertently loosened.

I also wrote my first custom exception: ChangedAPI.

I fixed #465 by adding a section “Visibility of eID reader actions” to The Lino Welfare “Eupen” variant. This brought some optimizations into lino.utils.diag:

  • Makes now usage of an analyzer object which has some more methods.

  • The list of window layouts no longer combines fields and visibility but shows two separate lists.

  • The list of profiles produced by lino.utils.diag.visible_for() no longer uses “all except” when there are more profiles which don’t see the action. And it no longer inserts commas between them.

These details in formatting make things easier to manage when a test case fails because something has changed.