Skip to content

Commit

Permalink
Fixing misspelling. made changes to domain claim email. (#5248)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmccannon authored Jan 10, 2025
1 parent 904692a commit 730f83b
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private async Task RevokeNonCompliantUsersAsync(Guid organizationId, IActingUser
}

await Task.WhenAll(currentActiveRevocableOrganizationUsers.Select(x =>
_mailService.SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(organization.DisplayName(), x.Email)));
_mailService.SendOrganizationUserRevokedForTwoFactorPolicyEmailAsync(organization.DisplayName(), x.Email)));

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build MSSQL migrator utility (osx-x64)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build MSSQL migrator utility (linux-x64)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Events, ./src)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build MSSQL migrator utility (win-x64)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Notifications, ./src)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Setup, ./util)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Api, ./src)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Icons, ./src)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (EventsProcessor, ./src)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (MsSqlMigratorUtility, ./util, true)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Billing, ./src)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Scim, ./bitwarden_license/src, true)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Identity, ./src)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Sso, ./bitwarden_license/src, true)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Quality scan

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Build artifacts (Admin, ./src, true)

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Run tests

Dereference of a possibly null reference.

Check warning on line 114 in src/Core/AdminConsole/OrganizationFeatures/Policies/PolicyValidators/TwoFactorAuthenticationPolicyValidator.cs

View workflow job for this annotation

GitHub Actions / Upload

Dereference of a possibly null reference.
}

private async Task RemoveNonCompliantUsersAsync(Guid organizationId)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{{#>TitleContactUsHtmlLayout}}
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="display: table; width:100%; padding: 30px; text-align: left;" align="center">
<tr>
<td display="display: table-cell">
As a member of {{OrganizationName}}, your Bitwarden account is claimed and owned by your organization.
</td>
</tr>
<tr>
<td style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; font-style: normal; font-weight: 400; font-size: 16px; line-height: 24px; margin-top: 30px; margin-bottom: 25px; margin-left: 35px; margin-right: 35px;">
<b>Here's what that means:</b>
<ul>
<li>Your Bitwarden account is owned by {{OrganizationName}}</li>
<li>Your administrators can delete your account at any time</li>
<li>You cannot leave the organization</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Services/IMailService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Task SendTrialInitiationSignupEmailAsync(
Task SendOrganizationAcceptedEmailAsync(Organization organization, string userIdentifier, IEnumerable<string> adminEmails, bool hasAccessSecretsManager = false);
Task SendOrganizationConfirmedEmailAsync(string organizationName, string email, bool hasAccessSecretsManager = false);
Task SendOrganizationUserRemovedForPolicyTwoStepEmailAsync(string organizationName, string email);
Task SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(string organizationName, string email);
Task SendOrganizationUserRevokedForTwoFactorPolicyEmailAsync(string organizationName, string email);
Task SendOrganizationUserRevokedForPolicySingleOrgEmailAsync(string organizationName, string email);
Task SendPasswordlessSignInAsync(string returnUrl, string token, string email);
Task SendInvoiceUpcoming(
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Services/Implementations/HandlebarsMailService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public async Task SendOrganizationUserRemovedForPolicyTwoStepEmailAsync(string o
await _mailDeliveryService.SendEmailAsync(message);
}

public async Task SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(string organizationName, string email)
public async Task SendOrganizationUserRevokedForTwoFactorPolicyEmailAsync(string organizationName, string email)
{
var message = CreateDefaultMessage($"You have been revoked from {organizationName}", email);
var model = new OrganizationUserRevokedForPolicyTwoFactorViewModel
Expand Down Expand Up @@ -472,7 +472,7 @@ MailQueueMessage CreateMessage(string emailAddress, Organization org) =>
"AdminConsole.DomainClaimedByOrganization",
new ClaimedDomainUserNotificationViewModel
{
TitleFirst = $"Hey {emailAddress}, your account is owned by {org.DisplayName()}",
TitleFirst = $"Your Bitwarden account is claimed by {org.DisplayName()}",
OrganizationName = CoreHelpers.SanitizeForEmail(org.DisplayName(), false)
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Services/Implementations/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,7 @@ await _revokeNonCompliantOrganizationUserCommand.RevokeNonCompliantOrganizationU
p.OrganizationId,
[new OrganizationUserUserDetails { Id = p.OrganizationUserId, OrganizationId = p.OrganizationId }],
new SystemUser(EventSystemUser.TwoFactorDisabled)));
await _mailService.SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(organization.DisplayName(), user.Email);
await _mailService.SendOrganizationUserRevokedForTwoFactorPolicyEmailAsync(organization.DisplayName(), user.Email);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Services/NoopImplementations/NoopMailService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public Task SendOrganizationUserRemovedForPolicyTwoStepEmailAsync(string organiz
return Task.FromResult(0);
}

public Task SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(string organizationName, string email) =>
public Task SendOrganizationUserRevokedForTwoFactorPolicyEmailAsync(string organizationName, string email) =>
Task.CompletedTask;

public Task SendOrganizationUserRevokedForPolicySingleOrgEmailAsync(string organizationName, string email) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ await sutProvider.GetDependency<IRevokeNonCompliantOrganizationUserCommand>()

await sutProvider.GetDependency<IMailService>()
.Received(1)
.SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(organization.DisplayName(),
.SendOrganizationUserRevokedForTwoFactorPolicyEmailAsync(organization.DisplayName(),
"[email protected]");
}
}
6 changes: 3 additions & 3 deletions test/Core.Test/Services/UserServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ await sutProvider.GetDependency<IRevokeNonCompliantOrganizationUserCommand>()
r.OrganizationUsers.First().OrganizationId == organization1.Id));
await sutProvider.GetDependency<IMailService>()
.Received(1)
.SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(organization1.DisplayName(), user.Email);
.SendOrganizationUserRevokedForTwoFactorPolicyEmailAsync(organization1.DisplayName(), user.Email);

// Remove the user from the second organization
await sutProvider.GetDependency<IRevokeNonCompliantOrganizationUserCommand>()
Expand All @@ -528,7 +528,7 @@ await sutProvider.GetDependency<IRevokeNonCompliantOrganizationUserCommand>()
r.OrganizationUsers.First().OrganizationId == organization2.Id));
await sutProvider.GetDependency<IMailService>()
.Received(1)
.SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(organization2.DisplayName(), user.Email);
.SendOrganizationUserRevokedForTwoFactorPolicyEmailAsync(organization2.DisplayName(), user.Email);
}

[Theory, BitAutoData]
Expand Down Expand Up @@ -572,7 +572,7 @@ await sutProvider.GetDependency<IRevokeNonCompliantOrganizationUserCommand>()
.RevokeNonCompliantOrganizationUsersAsync(default);
await sutProvider.GetDependency<IMailService>()
.DidNotReceiveWithAnyArgs()
.SendOrganizationUserRevokedForTwoFactoryPolicyEmailAsync(default, default);
.SendOrganizationUserRevokedForTwoFactorPolicyEmailAsync(default, default);
}

[Theory, BitAutoData]
Expand Down

0 comments on commit 730f83b

Please sign in to comment.