mirror of
https://github.com/bitwarden/server
synced 2026-01-05 18:13:31 +00:00
apis for org vault listing
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
CREATE PROCEDURE [dbo].[Cipher_ReadByOrganizationId]
|
||||
@OrganizationId UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[CipherView]
|
||||
WHERE
|
||||
[OrganizationId] = @OrganizationId
|
||||
END
|
||||
@@ -0,0 +1,15 @@
|
||||
CREATE PROCEDURE [dbo].[SubvaultCipher_ReadByOrganizationId]
|
||||
@OrganizationId UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
SC.*
|
||||
FROM
|
||||
[dbo].[SubvaultCipher] SC
|
||||
INNER JOIN
|
||||
[dbo].[Subvault] S ON S.[Id] = SC.[SubvaultId]
|
||||
WHERE
|
||||
S.[OrganizationId] = @OrganizationId
|
||||
END
|
||||
@@ -18,6 +18,12 @@ CREATE NONCLUSTERED INDEX [IX_Cipher_UserId_Type]
|
||||
ON [dbo].[Cipher]([UserId] ASC, [Type] ASC);
|
||||
|
||||
|
||||
GO
|
||||
CREATE NONCLUSTERED INDEX [IX_Cipher_OrganizationId_Type]
|
||||
ON [dbo].[Cipher]([OrganizationId] ASC, [Type] ASC)
|
||||
WHERE [OrganizationId] IS NOT NULL;
|
||||
|
||||
|
||||
GO
|
||||
CREATE TRIGGER [dbo].[Cipher_Inserted]
|
||||
ON [dbo].[Cipher] AFTER INSERT
|
||||
|
||||
Reference in New Issue
Block a user