-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-27882] Add SendOrganizationConfirmationCommand #6743
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
[PM-27882] Add SendOrganizationConfirmationCommand #6743
Conversation
|
New Issues (3)Checkmarx found the following issues in this Pull Request
|
This reverts commit 98812dd.
| handlebars.RegisterTemplate("FullHtmlLayout", layoutSource); | ||
|
|
||
| // Register Full layouts | ||
| var fullHtmlLayoutSource = await ReadSourceAsync(assembly, "Bit.Core.MailTemplates.Handlebars.Layouts.Full.html.hbs"); |
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.
We need this so that shared layouts for the text.hbs files will work. For example, TitleContactUs.text.hbs for OrganizationConfirmationEnterpriseTeamsView.text.hbs
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6743 +/- ##
==========================================
+ Coverage 54.96% 55.01% +0.04%
==========================================
Files 1930 1934 +4
Lines 85507 85616 +109
Branches 7654 7660 +6
==========================================
+ Hits 47002 47100 +98
- Misses 36718 36728 +10
- Partials 1787 1788 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| /// The subject of the email. | ||
| /// </summary> | ||
| public abstract string Subject { get; } | ||
| public abstract string Subject { get; set; } |
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 subject for the organization confirmation email is dynamic since we have to include the organization name in it. I had to update this to include a set, which caused a cascading effect.
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 ViewModel names need to match the templates. Our templates use kebab-case (MJML), while the ViewModels use PascalCase. We should standardize these conventions, but this is outside the AC team’s scope. The owner of the mailer and MJML should decide this.
I don’t recommend creating a script to map one naming convention to another. That adds complexity and could introduce more issues over time.
|
Claude finished @JimmyVo16's task in 2m 22s —— View job Code Review CompleteOverall Assessment: REQUEST CHANGES - One critical bug found Critical IssueMissing In await sendOrganizationConfirmationCommand.SendConfirmationAsync(organization, userEmail);Should be: await sendOrganizationConfirmationCommand.SendConfirmationAsync(organization, userEmail, accessSecretsManager);Impact: Users who have Secrets Manager access and are auto-confirmed will receive the wrong vault URL in their confirmation email (standard vault URL instead of Secrets Manager URL). Fix: Pass Note: Additional ObservationsMissing test coverage: No test verifies that Question about HTML decoding: Positive Notes
|
r-tome
left a comment
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.
Looks good! Just a few thoughts
|
|
||
| namespace Bit.Core.AdminConsole.Models.Mail.Mailer.OrganizationConfirmation; | ||
|
|
||
| #nullable enable |
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 can be removed
|
|
||
| namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.OrganizationConfirmation; | ||
|
|
||
| #nullable enable |
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.
Not necessary
...AdminConsole/Models/Mail/Mailer/OrganizationConfirmation/OrganizationConfirmationBaseView.cs
Show resolved
Hide resolved
...e/Models/Mail/Mailer/OrganizationConfirmation/OrganizationConfirmationEnterpriseTeamsView.cs
Outdated
Show resolved
Hide resolved
src/Core/Core.csproj
Outdated
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <Folder Include="MailTemplates\Handlebars\MJML\AdminConsole\OrganizationConfirmation\" /> |
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.
❓ Is this necessary?
| View = new OrganizationConfirmationEnterpriseTeamsView | ||
| { | ||
| OrganizationName = organizationName, | ||
| TitleFirst = "You're confirmed as a member of ", |
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.
Consider placing this hardcoded string in a const variable because it is repeated below
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.
Yeah, normally I abstract them when it hits three, but we can do it now.
amorask-bitwarden
left a comment
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.
Looks like Billing changes are just formatting, so looks good for us.


🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-27882
📔 Objective
📸 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