-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[PM-21612] [Unified] Fix unhandled error when editing an invited member #5817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[PM-21612] [Unified] Fix unhandled error when editing an invited member #5817
Conversation
New Issues (1)Checkmarx found the following issues in this Pull Request
Fixed Issues (4)Great job! The following issues were fixed in this Pull Request
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5817 +/- ##
==========================================
+ Coverage 47.54% 50.80% +3.26%
==========================================
Files 1651 1651
Lines 74814 74820 +6
Branches 6724 6726 +2
==========================================
+ Hits 35569 38011 +2442
+ Misses 37787 35289 -2498
- Partials 1458 1520 +62 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 The tools changes are limited to the userId change mentioned by @eliykat in the description.
@gbubemismith - if this change looks good to you, then it should be good for us, too.
src/Infrastructure.EntityFramework/Repositories/DatabaseContextExtensions.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Looks good
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-21612
📔 Objective
As reported by @rsulzenbacher here, you cannot edit a Member in the Invited state on Unified due to an unhandled server error.
This was caused by trying to update the User's account revision date, however an invited member is not linked to any User account yet.
Changes:
OrganizationUserRepository.ReplaceAsync
EF method to check for null onUserId
first, rather than usingGetValueOrDefault()
which is not appropriate here.CipherRepository
, so I updated that while I was here. I changed this interface so the caller has to specify aUserId
, which I think is preferable to picking the first from the list.📸 Screenshots
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes