mirror of
https://github.com/bitwarden/server.git
synced 2024-12-01 13:43:23 +01:00
908e1504af
* Fix fingerprint phrases in bulk confirm modal * Fix indentation
27 lines
696 B
Transact-SQL
27 lines
696 B
Transact-SQL
IF OBJECT_ID('[dbo].[User_ReadPublicKeysByOrganizationUserIds]') IS NOT NULL
|
|
BEGIN
|
|
DROP PROCEDURE [dbo].[User_ReadPublicKeysByOrganizationUserIds]
|
|
END
|
|
GO
|
|
|
|
CREATE PROCEDURE [dbo].[User_ReadPublicKeysByOrganizationUserIds]
|
|
@OrganizationId UNIQUEIDENTIFIER,
|
|
@OrganizationUserIds [dbo].[GuidIdArray] READONLY
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON
|
|
|
|
SELECT
|
|
OU.[Id],
|
|
OU.[UserId],
|
|
U.[PublicKey]
|
|
FROM
|
|
@OrganizationUserIds OUIDs
|
|
INNER JOIN
|
|
[dbo].[OrganizationUser] OU ON OUIDs.Id = OU.Id AND OU.[Status] = 1 -- Accepted
|
|
INNER JOIN
|
|
[dbo].[User] U ON OU.UserId = U.Id
|
|
WHERE
|
|
OU.OrganizationId = @OrganizationId
|
|
END
|