mirror of
https://github.com/bitwarden/server
synced 2026-01-09 20:13:24 +00:00
[AC-432] Checking if any of the selected Organizations is already assigned to a Provider
This commit is contained in:
@@ -264,6 +264,7 @@
|
||||
<Build Include="dbo\Stored Procedures\Policy_Update.sql" />
|
||||
<Build Include="dbo\Stored Procedures\ProviderOrganizationOrganizationDetails_ReadByProviderId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\ProviderOrganizationProviderDetails_ReadByUserId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\ProviderOrganization_ReadByOrganizationIds.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Provider_ReadByOrganizationId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Organization_UnassignedToProviderSearch.sql" />
|
||||
<Build Include="dbo\Stored Procedures\ProviderOrganization_Create.sql" />
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
CREATE PROCEDURE [dbo].[ProviderOrganization_ReadByOrganizationIds]
|
||||
@Ids AS [dbo].[GuidIdArray] READONLY
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
IF (SELECT COUNT(1) FROM @Ids) < 1
|
||||
BEGIN
|
||||
RETURN(-1)
|
||||
END
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[ProviderOrganizationView]
|
||||
WHERE
|
||||
[OrganizationId] IN (SELECT [Id] FROM @Ids)
|
||||
END
|
||||
Reference in New Issue
Block a user