mirror of
https://github.com/bitwarden/server.git
synced 2025-04-04 12:40:22 -05:00
Introduce organization integration configuration details (#5568)
This commit is contained in:
parent
fb0567b45e
commit
6e81cee221
@ -0,0 +1,20 @@
|
||||
CREATE PROCEDURE [dbo].[OrganizationIntegrationConfigurationDetails_ReadManyByEventTypeOrganizationIdIntegrationType]
|
||||
@EventType SMALLINT,
|
||||
@OrganizationId UNIQUEIDENTIFIER,
|
||||
@IntegrationType SMALLINT
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
oic.*
|
||||
FROM
|
||||
[dbo].[OrganizationIntegrationConfigurationDetailsView] oic
|
||||
WHERE
|
||||
oic.[EventType] = @EventType
|
||||
AND
|
||||
oic.[OrganizationId] = @OrganizationId
|
||||
AND
|
||||
oic.[IntegrationType] = @IntegrationType
|
||||
END
|
||||
GO
|
@ -1,22 +0,0 @@
|
||||
CREATE PROCEDURE [dbo].[OrganizationIntegrationConfiguration_ReadManyByEventTypeOrganizationIdIntegrationType]
|
||||
@EventType SMALLINT,
|
||||
@OrganizationId UNIQUEIDENTIFIER,
|
||||
@IntegrationType SMALLINT
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
oic.*
|
||||
FROM
|
||||
[dbo].[OrganizationIntegrationConfigurationView] oic
|
||||
INNER JOIN
|
||||
[dbo].[OrganizationIntegration] oi ON oi.[Id] = oic.[OrganizationIntegrationId]
|
||||
WHERE
|
||||
oic.[EventType] = @EventType
|
||||
AND
|
||||
oi.[OrganizationId] = @OrganizationId
|
||||
AND
|
||||
oi.[Type] = @IntegrationType
|
||||
END
|
||||
GO
|
@ -0,0 +1,13 @@
|
||||
CREATE VIEW [dbo].[OrganizationIntegrationConfigurationDetailsView]
|
||||
AS
|
||||
SELECT
|
||||
oi.[OrganizationId],
|
||||
oi.[Type] AS [IntegrationType],
|
||||
oic.[EventType],
|
||||
oic.[Configuration],
|
||||
oi.[Configuration] AS [IntegrationConfiguration],
|
||||
oic.[Template]
|
||||
FROM
|
||||
[dbo].[OrganizationIntegrationConfiguration] oic
|
||||
INNER JOIN
|
||||
[dbo].[OrganizationIntegration] oi ON oi.[Id] = oic.[OrganizationIntegrationId]
|
@ -0,0 +1,49 @@
|
||||
IF EXISTS(SELECT *
|
||||
FROM sys.views
|
||||
WHERE [Name] = 'OrganizationIntegrationConfigurationDetailsView')
|
||||
BEGIN
|
||||
DROP VIEW [dbo].[OrganizationIntegrationConfigurationDetailsView];
|
||||
END
|
||||
GO
|
||||
|
||||
CREATE VIEW [dbo].[OrganizationIntegrationConfigurationDetailsView]
|
||||
AS
|
||||
SELECT
|
||||
oi.[OrganizationId],
|
||||
oi.[Type] AS [IntegrationType],
|
||||
oic.[EventType],
|
||||
oic.[Configuration],
|
||||
oi.[Configuration] AS [IntegrationConfiguration],
|
||||
oic.[Template]
|
||||
FROM
|
||||
[dbo].[OrganizationIntegrationConfiguration] oic
|
||||
INNER JOIN
|
||||
[dbo].[OrganizationIntegration] oi ON oi.[Id] = oic.[OrganizationIntegrationId]
|
||||
GO
|
||||
|
||||
IF OBJECT_ID('[dbo].[OrganizationIntegrationConfiguration_ReadManyByEventTypeOrganizationIdIntegrationType]') IS NOT NULL
|
||||
BEGIN
|
||||
DROP PROCEDURE [dbo].[OrganizationIntegrationConfiguration_ReadManyByEventTypeOrganizationIdIntegrationType]
|
||||
END
|
||||
GO
|
||||
|
||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationIntegrationConfigurationDetails_ReadManyByEventTypeOrganizationIdIntegrationType]
|
||||
@EventType SMALLINT,
|
||||
@OrganizationId UNIQUEIDENTIFIER,
|
||||
@IntegrationType SMALLINT
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
oic.*
|
||||
FROM
|
||||
[dbo].[OrganizationIntegrationConfigurationDetailsView] oic
|
||||
WHERE
|
||||
oic.[EventType] = @EventType
|
||||
AND
|
||||
oic.[OrganizationId] = @OrganizationId
|
||||
AND
|
||||
oic.[IntegrationType] = @IntegrationType
|
||||
END
|
||||
GO
|
Loading…
x
Reference in New Issue
Block a user