1
0
mirror of https://github.com/bitwarden/server synced 2025-12-29 14:43:39 +00:00

[PM-25372] Filter out DefaultUserCollections from CiphersController.GetAssignedOrganizationCiphers (#6274)

Co-authored-by: Jimmy Vo <huynhmaivo82@gmail.com>
This commit is contained in:
Rui Tomé
2025-09-17 17:43:27 +01:00
committed by GitHub
parent 57f891f391
commit d83395aeb0
8 changed files with 162 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
CREATE PROCEDURE [dbo].[CollectionCipher_ReadSharedByOrganizationId]
@OrganizationId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
CC.[CollectionId],
CC.[CipherId]
FROM
[dbo].[CollectionCipher] CC
INNER JOIN
[dbo].[Collection] C ON C.[Id] = CC.[CollectionId]
WHERE
C.[OrganizationId] = @OrganizationId
AND C.[Type] = 0 -- SharedCollections only
END

View File

@@ -14,6 +14,6 @@ GO
CREATE NONCLUSTERED INDEX [IX_Collection_OrganizationId_IncludeAll]
ON [dbo].[Collection]([OrganizationId] ASC)
INCLUDE([CreationDate], [Name], [RevisionDate]);
INCLUDE([CreationDate], [Name], [RevisionDate], [Type]);
GO