[PM-40533] feat: Validate recipient email domains against SendControls allowed domains - #7269
Draft
andrebispo5 wants to merge 3 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## PM-40531-lock-who-can-view-when-enforced #7269 +/- ##
============================================================================
+ Coverage 85.93% 86.20% +0.27%
============================================================================
Files 937 894 -43
Lines 67225 65371 -1854
Branches 9861 9826 -35
============================================================================
- Hits 57769 56354 -1415
+ Misses 5937 5513 -424
+ Partials 3519 3504 -15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-40533
📔 Objective
When an org's SendControls policy sets
allowedDomains, saving a Send with Specific peoplerecipients now checks each recipient's domain against that list, and blocks the save with an error
dialog if any of them falls outside it.
What changed
handleSaveClick, right after the existing email formatvalidation, so it does not fire on every keystroke
the allowed domains
before both matching and display. Domain matching is case-insensitive
","for example, counts as no restriction. Failingclosed there would block saving with no way for the user to recover
Scope
Other access types are untouched
validation is unaffected either way
Note for reviewers
This stacks on #7266 (PM-40531), so please review that one first. The diff here is only the last
three commits.
📸 Screenshots