mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
Bulk re-invite of org users (#1316)
* Add APIs for Bulk reinvinte * Resolve review comments.
This commit is contained in:
24
util/Migrator/DbScripts/2021-05-11_00_BulkReinvite.sql
Normal file
24
util/Migrator/DbScripts/2021-05-11_00_BulkReinvite.sql
Normal file
@ -0,0 +1,24 @@
|
||||
IF OBJECT_ID('[dbo].[OrganizationUser_ReadByIds]') IS NOT NULL
|
||||
BEGIN
|
||||
DROP FUNCTION [dbo].[OrganizationUser_ReadByIds]
|
||||
END
|
||||
GO
|
||||
|
||||
CREATE PROCEDURE [dbo].[OrganizationUser_ReadByIds]
|
||||
@Ids AS [dbo].[GuidIdArray] READONLY
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
IF (SELECT COUNT(1) FROM @Ids) < 1
|
||||
BEGIN
|
||||
RETURN(-1)
|
||||
END
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[OrganizationUserView]
|
||||
WHERE
|
||||
[Id] IN (SELECT [Id] FROM @Ids)
|
||||
END
|
Reference in New Issue
Block a user