mirror of
https://github.com/bitwarden/server.git
synced 2025-07-17 23:50:58 -05:00
apis for org vault listing
This commit is contained in:
@ -174,5 +174,7 @@
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUserUserDetails_ReadById.sql" />
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUserUserDetails_ReadByOrganizationId.sql" />
|
||||
<Build Include="dbo\User Defined Types\GuidIdArray.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Cipher_ReadByOrganizationId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\SubvaultCipher_ReadByOrganizationId.sql" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -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