bmersereau fixes the silent failure in project sharing

Three bug reports traced back to the same problem: shared access depended on how an email happened to be capitalised on its way in.

multi-tenantworkflow

Users were being denied access to projects that had been legitimately shared with them - not because of a permissions decision, but because the system was comparing email addresses with case sensitivity in some places and without it in others. Three different endpoints handled the same email field three different ways: one stored what the user typed, another lowercased on update, a third matched character-for-character on read. Whether sharing worked came down to which path your email took.

bmersereau pulled the normalisation logic out of the individual endpoints and into one place that every project route now calls through. Writes get lowercased, deduplicated, and stripped of empty entries; reads compare without caring about case. Eight unit tests pin down the edges.

So what Worth a look for anyone running a multi-user legal product where quiet sharing failures get blamed on the user rather than the code.

View this fork on GitHub →

Spotted something wrong? Or know the PR text has fresher detail than the writeup above?