mirror of
https://github.com/bitwarden/server.git
synced 2024-12-24 17:17:40 +01:00
c442bae2bc
* Add Organization_ReadOwnerEmailAddresses SPROC * Add IOrganizationRepository.GetOwnerEmailAddressesById * Add SendInvoiceUpcoming overload for multiple emails * Update InvoiceUpcoming handler to send multiple emails * Cy's feedback * Updates from testing Hardened against missing entity IDs in Stripe events in the StripeEventService. Updated ValidateCloudRegion to not use a refresh/expansion for the customer because the invoice.upcoming event does not have an invoice.Id. Updated the StripeController's handling of invoice.upcoming to not use a refresh/expansion for the subscription because the invoice does not have an ID. * Fix broken test
18 lines
435 B
Transact-SQL
18 lines
435 B
Transact-SQL
CREATE OR ALTER PROCEDURE [dbo].[Organization_ReadOwnerEmailAddressesById]
|
|
@OrganizationId UNIQUEIDENTIFIER
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON
|
|
|
|
SELECT
|
|
[U].[Email]
|
|
FROM [User] AS [U]
|
|
INNER JOIN [OrganizationUser] AS [OU] ON [U].[Id] = [OU].[UserId]
|
|
WHERE
|
|
[OU].[OrganizationId] = @OrganizationId AND
|
|
[OU].[Type] = 0 AND -- Owner
|
|
[OU].[Status] = 2 -- Confirmed
|
|
GROUP BY [U].[Email]
|
|
END
|
|
GO
|