Repository navigation
🐛(frontend) support users without an email in the share modal - #3057
sanketpatel32 wants to merge 1 commit into
Conversation
The API returns email: null for users without an identity email (for example a staff account created with createsuperuser) while the User type declared email: string, so searching such a user crashed the share modal on user.email.toLowerCase(). The type now reflects the API and the call sites are null-safe. Refs suitenumerique#2989 Signed-off-by: Sanket Patel <sanpatel323@gmail.com>
|
No actionable comments were generated in the recent review. WalkthroughThe frontend Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Medium Suggested reviewers: Merge Risk:
|
Purpose
Fixes #2989.
The API returns
email: nullfor users without an email (e.g. staff accounts). The share modal calleduser.email.toLowerCase()and crashed, and several other places assumedemailwas always a string.Proposal
emailasstring | nullin the user API types.toLowerCasecall inDocShareModalandDocShareAddMemberList.full_name, thenemail, thenundefinedinSearchUserRowand the collaborative cursor name.userMenusoFooterActionsnever renders an undefined email.External contributions
General requirements
CI requirements
git commit --signoff(DCO compliance)git commit -S) — no signing key is available in this environment; let me know if it is required and I will arrange it<gitmoji>(type) title description## [Unreleased]section (if noticeable change)AI requirements