Block self-share on projects and tabular reviews

Owners could share a project or tabular review with their own email, producing redundant member-list entries. willchen96 closed this across three API endpoints and two frontend entry points in one shot, and also added email normalization and deduplication before persistence.

multi-tenantworkflow

The fix rejects self-share emails at the API boundary on project creation, project updates, and tabular-review updates. The same check runs in the People modal and the new-project flow so the UI doesn't send a request the backend will refuse.

Email normalization and deduplication were added as part of the same change. Before this, the same collaborator could appear multiple times with different casing or whitespace, because nothing enforced a canonical form before writing to storage. The storage shape and the validation logic now agree on what a share entry looks like.

willchen96 framed this as a consistency fix rather than a security one. An owner sharing with themselves never granted additional access - they already have full rights. The practical issue was polluted membership views and ambiguous access states. Applying the same rule across five entry points in one PR is the right way to handle this kind of invariant, since partial coverage is worse than none.

So what Low-risk pull if you've shipped the sharing feature. The email normalization fix is the more valuable piece - preventing duplicate member entries is a correctness issue that gets harder to clean up after the fact.

View this fork on GitHub →

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

Commits in this thread

3 commits from willchen96/mike, oldest first. Source extracted verbatim from the harvested git log.

SHA Subject Author Date
08d99678 feat: enhance workflow sharing by preventing users from sharing with themselves and normalizing email inputs willchen96 2026-05-14 ↗ GitHub
87e55d60 feat: prevent users from sharing projects and reviews with themselves willchen96 2026-05-16 ↗ GitHub
4290104c Merge pull request #136 from willchen96/prevent-self-sharing cosimoastrada 2026-05-16 ↗ GitHub
feat: prevent users from sharing projects and reviews with themselves

Capture this thread into my fork

Download a single Markdown prompt that tells Claude how to port every commit above into your working tree — adapting paths and structure to match your repo. Run it via claude -p < capture-thread-477.md from inside the repo you want the changes in.

⬇ Download capture-thread-477.md